planetscape has asked for the wisdom of the Perl Monks concerning the following question:
Hello. Could someone please tell me if I've found (a) a bug in Array::Compare, (b) some 5.10 weirdness, or (c) if I am just making a really obvious mistake?
My code, taken almost entirely from the synopsis:
#!/usr/bin/perl -w use strict; use warnings; use Array::Compare; my @array1 = [1, 2]; my @array2 = [2, 1]; my $comp = Array::Compare->new; if ($comp->perm (\@array1, \@array2)) { print "Arrays are perms\n"; } else { print "Nope. Arrays are completely different\n"; }
The output, which is the same under Cygwin and Strawberry, both 5.10:
Nope. Arrays are completely differentThey should be permutations, yes?
Strawberry Perl, on Win XP Pro SP3:
This is perl, v5.10.0 built for MSWin32-x86-multi-thread Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bug in Array::Compare?
by Corion (Patriarch) on Apr 07, 2009 at 07:38 UTC | |
|
Re: Bug in Array::Compare?
by citromatik (Curate) on Apr 07, 2009 at 07:57 UTC | |
by planetscape (Chancellor) on Apr 07, 2009 at 08:31 UTC |