Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I was trying to open a file and do a (/\bVar*e\b) and then try to save it in an array. Then open the 2nd file and compare the array with the pattern. But I failed.
I found out here that there is a command like
but I dont' understand it and it only matches the length of the lines in two files.perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' fileA fileB >output
I have a variable and want to see if they are used in these 2 files and want to see the display or the lines either on standard out or > output.txt. Can anyone help? I'm not good at programming. Using C seems even harder.
Any help would be appreciated much. Thanks.
DAVE
Edit 2001-03-16 by tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Find certain words in multiple files
by arturo (Vicar) on Mar 17, 2001 at 04:09 UTC | |
|
Re: Find certain words in multiple files
by buckaduck (Chaplain) on Mar 17, 2001 at 04:36 UTC |