in reply to Re: Most efficient way of search elements in an array
in thread Most efficient way of search elements in an array

But Smartmatch is smart enough to match on numeric equality:
>perl -wMstrict -le "for my $ar ( [1, 1, 0, 1], [0], [0, 0, 0], [qw(0)], [qw(00)], [qw(000)], [qw(1 1 0 1)], [1], [], [1, 10, 01, 101, 010], [qw(1 10 01 101 010)], ) { print qq{(@$ar): }, @$ar ~~ 0 ? 'naught' : 'not' } " (1 1 0 1): naught (0): naught (0 0 0): naught (0): naught (00): naught (000): naught (1 1 0 1): naught (1): not (): not (1 10 1 101 8): not (1 10 01 101 010): not
Update: Added 'numeric string' test cases.