in reply to Re^2: hash substrings
in thread hash substrings
Good general advice... in this case, however, every match will succeed -- the test is required to spot the key matching itself. For the paranoid one could write:
but the next unless is redundant.foreach my $k (@k) { next unless $s =~ m/(.)$k(.)/ ; next if (($1 eq "\0") && ($2 eq "\0")) ; delete $h{$k} ; } ;
|
|---|