Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: 'prev' in for loop

by blazar (Canon)
on Dec 06, 2005 at 14:52 UTC ( #514478=note: print w/replies, xml ) Need Help??


in reply to 'prev' in for loop

In for loop, i can able to move my index to either 'last' or 'next' . I don't know why it's throwing error, when i use 'prev' for accessing prev index.

It's throwing an error due to a perl bug: precisely that it is not implemented. Strangely enough neither the prev keyword nor that obvious bug are documented at all...

The workaround is called $prev.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2018-07-15 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (326 votes). Check out past polls.

    Notices?