Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: array question

by Corion (Patriarch)
on Jun 30, 2010 at 13:48 UTC ( #847335=note: print w/replies, xml ) Need Help??


in reply to array question

Do you want all elements of the array at once? Then use @array. Or do you want to process each element of the array? Then use

foreach my $element (@array) { print "I am processing the element '$element'\n"; };

You might want to see perlsyn.

Further reading would be map if you want to transform elements of one array into another list.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2023-05-31 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?