foreach my $item(@items) { eval { next if(is_problematic($item)); do_something($item); }; if($@) { warn "problem with $item $@"; } }