>I want to compare between two arrays. This is what you want?
$fail = 0;
if (@a!=@b) {
$fail = 1;
} else {
for ( $i=0; $i<@a; $i++ ) {
if ($a[$i]==$b[$i]) { next; }
else { $fail = 1; last; }
}
}
if ($fail)
{ print "not equal\n"; }
else { print "equal\n"; }
Mike's solution approaches the problem of comparing
arrays and determine if they contain the same elements
(in any order).
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
