go ahead... be a heretic | |
PerlMonks |
Re: All array elements the same?by ray (Initiate) |
on Aug 01, 2000 at 21:13 UTC ( [id://25505]=note: print w/replies, xml ) | Need Help?? |
How about the following?
@a = qw(one one 1 one);
print "not the same\n" unless @a == grep m/$a[0]/o, @a;
Later,
Ray.
In Section
Seekers of Perl Wisdom
|
|