<i> while (<INPUT1>) { my $line = $_; chomp $line; my @words = $line; } while (<INPUT2>) { my $line2 = $_; chomp $line2; my @words2 = $line2; } </i>
can be replaced with:
my @words1 = <INPUT1> my @words2 = <INPUT2>
Coming to matching strings you can use ^(match at beginning) and $(match at end of string) according to requirement. so that partial matching is done.
| Life is a box of chocolates.. Perhaps you get to eat very few best ones!! |
In reply to Re: Comparing arrays
by zeni
in thread Comparing arrays
by SayWhat?!
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |