in reply to RE: Comparing Arrays
in thread Comparing Arrays
Givesmy @a1 = qw/357/; my @a2 = qw/3 5 7/; print "@a1\n"; print "@a2\n";
Different strings.357 3 5 7
You could change $" to be something weirder when doing the comparison; something less likely to be found in a string normally. Like $;:
sub areq { local $" = $;; "@{$_[0]}" eq "@{$_[1]}"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: Comparing Arrays
by lhoward (Vicar) on Sep 01, 2000 at 23:00 UTC | |
by jlistf (Monk) on Sep 01, 2000 at 23:09 UTC | |
by merlyn (Sage) on Sep 01, 2000 at 23:12 UTC |