open A, "a" or die; my %in_a = map { $_, 1 } <A>; open B, "b" or die; while (<B>) { print if $in_a{$_}; }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: Efficient code.
by merlyn
in thread Efficient code.
by murugu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |