|
|
| XP is just a number | |
| PerlMonks |
Re^2: How do I compare two arrays?by bimleshsharma (Beadle) |
| on Jun 30, 2011 at 06:33 UTC ( #912106=note: print w/ replies, xml ) | Need Help?? |
|
The best way what i find is to compare use FreezeThaw qw(cmpStr); @a =(1,2,3,4);@b = ( "this", "that", "more", "stuff" ); @c = (1,2,3,5); printf "a and b contain %s arrays\n",cmpStr(\@a, \@b) == 0 ? "the same" : "different"; printf "a and c contain %s arrays\n",cmpStr(\@a, \@c) == 0 ? "the same" : "different";
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||