in reply to Re: removing an element without index
in thread removing an element without index

if ($item !~ m/4/) { ... }

"If the scalar  $item after stringization does not have a '4' digit anywhere in it, then do ..." would be a better description. E.g., if it's not 4, 44, 3.14159, etc.