|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re^3: Some Basic Help.by Jenda (Monsignor) |
| on Sep 25, 2012 at 08:06 UTC ( #995505=note: print w/ replies, xml ) | Need Help?? |
|
Here's a quick intro. In your case you would not have any values in the hash, just keys. You'd read the smaller file and add the lines to a hash as keys (the values are irrelevant, use 1 for example). Then as you would read the other file you'd just check whether exists $hash{$line} and you'd know right away whether such line was in the first file or not. Jenda
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||