in reply to comparsion of 2 arrays
You may sort and then check if "@arr1" eq "@arr2", which is not bullet-proof, but could be suitable for your needs, especially if you set $" accordingly. This still involves more than one statement, well, unless you like a horrible hack like
Otherwise, whatever method you really use behind the scenes, who prevents you from wrapping it in a Compare() sub?"@{[sort @arr1]}" eq "@{[sort @arr2]}";
|
---|
In Section
Seekers of Perl Wisdom