in reply to findstr
Some comments.
1. You should use the <CODE> and </CODE> tags to surround your code.
2. Brackets around $ARGV subscripts are missing and in line 16 your code should be
my $text = <>;
3. Slurping the whole file at once (undef $/;) might not be the best solution for efficiency if you read a 500 MB file and your RAM is only 128 MB.
gmax