There's more than one way to do things | |
PerlMonks |
Re: Foreach loop explanationby Don Coyote (Hermit) |
on Nov 23, 2012 at 21:57 UTC ( [id://1005321]=note: print w/replies, xml ) | Need Help?? |
Hello. The reason is because all the lines match from one file to all the other lines in the other file. If I run your code on two files where some of the lines match and some do not, only the lines that match are printed.
update: oh. I didnt think of that SuicideJunkie! if i add a new line between 'three' and 'four' in file one, all the lines are printed out.
In Section
Seekers of Perl Wisdom
|
|