in reply to Multi-line Regex Performance

Here's another way to do the task which doesn't require reading the entire file into memory.
#!/usr/bin/perl use strict; use warnings; my %keeplist; open my $rids, '<', 'rids_that_have_versions.txt' or die $!; while (<$rids>) { chomp; $keeplist{$_} = 1;} close $rids; while (<STDIN>) { next unless /^##/; # only deal with '##' lines my $rid = substr($_, 19, 10); print "$rid: " . ($keeplist{$rid} ? 'y' : 'n') . "\n"; }

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart