http://qs321.pair.com?node_id=525329


in reply to Removing chars from a word from an array

I especially like the use of !~ with s/// here. I thought the use of hashes for this was overkill.
my $word = 'committee'; my @list = qw( t r e e ); @list = grep $word !~ s/\Q$_//, @list; print "W=$word, L=(@list)\n";

Caution: Contents may have been coded under pressure.