use List::AutoST; my $list = List::AutoST->new(); # these appear to behave like normal push @list, $some, $values, $here; $list[1] = $value2; # but then... print "Ok!" if $list->has('this value'); # or (also via overload) print "Ok!" if exists $list{'this value'};