for (split //, $string ) { next if /1/; $yes_or_no = $decision{$_} if exists $decision{$_}; print "$_ ($yes_or_no)\n"; }