Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Foreach Loops

by holli (Monsignor)
on Mar 15, 2005 at 19:05 UTC ( #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/


Comment on Re: Foreach Loops
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-06 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls