Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Removing array elements

by injunjoel (Priest)
on Aug 24, 2005 at 06:29 UTC ( #486111=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    ...
    my @b = (2,3,13,14,17);
    
    @a = do{my %i; undef @i{@a}; delete @i{@b}; sort {$a<=>$b} keys %i};
    
  2. or download this
    
    use strict;
    ...
        (grep /^$i$/, @b) ? () : $i ;
        }@a;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2019-08-21 05:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?