Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: how do foreach and while affect an array?

by davido (Cardinal)
on Sep 12, 2004 at 16:59 UTC ( #390446=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while ( @array ) {
        my $element = shift @array;
        # or "my $element = pop @array;".
        # Now, do something with $element
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-01-31 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?