perl -mstrict -we "my @arr=(1,2,2);print 'both' if [2,2] ~~ @arr[1,2]" both