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

Re: Foreach Loops

by holli (Abbot)
on Mar 15, 2005 at 19:05 UTC ( [id://439717]=note: print w/replies, xml ) Need Help??


in reply to Foreach Loops

Well, if you really need just the previous element you can go with
my $lline; foreach my $line (@arr) { ## stuff goes here; $lline = $line; }


holli, /regexed monk/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-19 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found