#/usr/bin/perl -w use strict; use v5.10.0; my @x = (1, 2, 3); my @y = (2, 3, 1); my @z = (1, 2, 4); print "x and y are equivalent" if sort (@x) ~~ sort (@y); # the sort order (numeric or alpha) doesn't matter # as long as it is consistent. __END__ x and y are equivalent