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
"@{[sort @arr1]}" eq "@{[sort @arr2]}";
Otherwise, whatever method you really use behind the scenes, who prevents you from wrapping it in a
Compare() sub?