in reply to Cleaning up a text file with compact regex
open( my $fh, '<', 'file.txt' ) or die "Cannot read file.txt: $!\n"; # clearer idiom, anyone? scalar <$fh> for 1 .. 6; while (<$fh>) { next if /^;/; # ... process lines }
In Section
Seekers of Perl Wisdom