my $ctrl = tie *fh, 'Tie::File::Custom', 'num.dat' or die "Unable to tie : $!"; $ctrl->LINES( 2 ); # Return 2 lines at a time $ctrl->BUFF( 100 ); # Read 100 bytes at a time since we expect sh