Open File1, read it line by line, parsing out the variables and saving them as the keys of a hash, with true values (like 1).
Open File2, read it line by line, parsing out the variable at the beginning of the line, checking to see if that variable exists as a key in your hash, and printing the line if it does.
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
In reply to Re: Parsing for [] in a file
by aaron_baugher
in thread Parsing for [] in a file
by HJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |