Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Avoiding vivification with array slice

by ikegami (Pope)
on Sep 09, 2008 at 19:45 UTC ( #710184=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @b = map { defined($a[$_]) ? ($a[$_]) : () } 0..5;
    
  2. or download this
    @b = grep { defined } map { $a[$_] } 0..5;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-12-25 04:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls