in reply to Parse a huge file and match the lines against a hash entry

As indicated by the first reply, a single regex consisting of 100 values as alternates is not such a big load, really. And you don't even need a special module to do it this way:
my $value_regex = join( '|', values %msgDefn ); # actually, use anony +monk's version below... while ( <FILEHANDLE> ) { print if ( /$value_regex/ ); }
That assumes that the values in your hash are all "safe", in the sense that they don't contain any regex magic characters, like brackets, *, ?, +, period, slash, backslash, and so on.

If the values might contain things of that sort, you could handle it like this (but YMMV, depending on what's really in your data):

my $value_regex = join( '|', map { '\Q'.$_.'\E' } values %msgDefn );
Now, if you ultimately need to know which hash key contains the value that actually matched a given line from the file, then you'd really want to build a reverse hash, as suggested in the 2nd reply.

Update (forgot to mention): Naturally, lots of other caveats apply, such as false-alarm matches on substrings (e.g. a value like "table", treated as above or as in the OP, would match on a line that contains "stable" or "tablet", which might not be what you want.

Replies are listed 'Best First'.
Re^2: Parse a huge file and match the lines against a hash entry
by Anonymous Monk on Jul 26, 2009 at 03:45 UTC
    join '|', map quotemeta, values
Re^2: Parse a huge file and match the lines against a hash entry
by snra_perl (Acolyte) on Jul 26, 2009 at 06:44 UTC
    Thanks everyone...
    It helped me a lot. The processing time reduced from 25 seconds to 1 second!!!!.