![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re: string comparisonby ihb (Deacon) |
on May 27, 2005 at 10:52 UTC ( #461019=note: print w/replies, xml ) | Need Help?? |
There's no restraints on these techniques. The words needn't be unique in the string nor do they have to be of equal length. Solution 1: Cancel out common elements. The last line says that they're different if there is any value that is non-zero, i.e. any element not cancelled out. Solution 2: Use &Test::More::eq_array
ihb
See perltoc if you don't know which perldoc to read!
In Section
Seekers of Perl Wisdom
|
|