in reply to Comparing sorted arrays
is that the arrays are getting interpreted in scalar context, which gives you the number of elements in the array.if (@sort_savepids ne @sort_livepids )
Both statements will print out.#!/usr/local/bin/perl use strict; my @s1 = qw( a b c ); my @s2 = qw( a b c ); my @s3 = qw( x y z ); print qq{s1 and s2 are equal\n} if ( @s1 eq @s2 ); print qq{s1 and s3 are equal(not really)\n} if ( @s1 eq @s3 );
Wonko
|
|---|