If you do:
my %hash; ++$hash{ $_ } while <>;
It will add and increment an entry in the hash for each line of every file named on the command line.
Then all you need to do is run through the hash and print out any key with a value equal to the number of files:
$hash{ $_ } == @ARGV and print for keys %hash;
In reply to Re: find common data in multiple files
by BrowserUk
in thread find common data in multiple files
by mao9856
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |