##
while (my $line = ) {
chomp $line;
push @$outref, $line;
# for test purposes - make it timeout!
sleep 5;
$outbytes += length($line);
if ($outbytes >= $g_max_file_size) {
warn "Maximum file size reached after $outbytes bytes";
last;
}
}
##
##
my $file_size = -s IFILE;
die "$file too large at $file_size bytes" if $file_size > $g_max_file_size;
@$outref = ;