in reply to How to compare arrays? (xmms alarm clock)

Hi,

#The following will perform hash based comparison,
#first array is stored within a temporary hash then data
#comparison is made, then size check is made, this
#avoids space problem but uses extra storage

perl -e 'my @x=qw(a b c); my @y=(q{a},q{b c}); { my %c; print 1 if @c{@y} = @y and @c{@x} and @x == @y }'

Audemus iura nostra defendere.
  • Comment on Re: How to compare arrays? (xmms alarm clock)