in reply to check if an element exists in array
use List::Util qw(first); first { $_ eq $needle } @list and say "Found!"; [download]