Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Removing chars from a word from an array

by Roy Johnson (Monsignor)
on Jan 24, 2006 at 21:58 UTC ( #525329=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://525329]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2022-01-26 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (69 votes). Check out past polls.

    Notices?