in reply to looking for simple way to check scalar against array
sub is { bless \shift, '_hidden'; } sub _hidden::in { my $s=${shift,}; $s eq $_ and return 1 for @_; 0; } [download]
do_something if is($item)->in(@list); [download]