Skip to content

Instantly share code, notes, and snippets.

@cfedde
Created February 21, 2013 22:53
Show Gist options
  • Save cfedde/5009183 to your computer and use it in GitHub Desktop.
Save cfedde/5009183 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use Modern::Perl;
use autodie;
my $x;
open my $f, "<", $ARGV[0];
seek $f, $ARGV[1], 0;
if ($ARGV[2]) {
read $f, $x, $ARGV[2];
print $x;
}
else {
print $x while (read $f, $x, 2048);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment