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

Re^3: Foreach Loops

by Anonymous Monk
on Mar 16, 2005 at 15:19 UTC ( #439977=note: print w/replies, xml ) Need Help??


in reply to Re^2: Foreach Loops
in thread Foreach Loops

Well, if you consider arrays to be circular, if $x == 0, then $arr[$x - 1] is the last element. Which would be just right. Unfortunally, it doesn't work the way. $arr[$#arr + 1] isn't the same as $arr[0].

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://439977]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2017-03-28 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (336 votes). Check out past polls.