Skip to content

Instantly share code, notes, and snippets.

@hernan604
Created November 21, 2013 00:12
Show Gist options
  • Save hernan604/7573659 to your computer and use it in GitHub Desktop.
Save hernan604/7573659 to your computer and use it in GitHub Desktop.
read file in chunks
open FILE, "text";
my $text;
while ( read FILE, $text, 10 ) {
warn $text;
}
open FILE, "text";
my $text;
while ( sysread FILE, $text, 10 ) {
warn $text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment