#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; use List::Util qw(shuffle); use Test::Deep::NoTest qw{ eq_deeply bag }; my @array1 = shuffle(1..100); my @array2 = shuffle(@array1); say eq_deeply(\@array1, bag(@array2)); # 1