Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Adding element to Array?

by ph0enix (Friar)
on Oct 13, 2009 at 07:16 UTC ( #800859=note: print w/replies, xml ) Need Help??


in reply to Adding element to Array?

If '0' (zero) can not be a valid element, you can try following code (append list element to array if it is "true" - not empty and not '0')

push @array, $list if $list;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2023-12-04 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (25 votes). Check out past polls.

    Notices?