Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: how do foreach and while affect an array?

by davido (Cardinal)
on Sep 12, 2004 at 16:59 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-24 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found