Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Removing chars from a word from an array

by blazar (Canon)
on Jan 24, 2006 at 16:20 UTC ( #525226=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @list= qw(a b c a c);
    my $w="kandabbbc";
    ...
       @list = grep {!/\Q$a/} @list;
    }
    print $w;
    
  2. or download this
    my %saw;
    for (@list) {
        next if $saw{$_}++;
        # ...
    }
    
  3. or download this
    my @list= qw(a b c a c);
    my $re = join '|', @list;
    
  4. or download this
    my $re=join "", @list;
    $re="[$re]";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2015-01-28 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (220 votes), past polls