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

Re: problem with perl "for" loop

by esskar (Deacon)
on Mar 11, 2004 at 23:08 UTC ( #336016=note: print w/replies, xml ) Need Help??


in reply to problem with perl "for" loop

well, your loop iterates one too much.
Fix:
for($left = 0; $left < $#hold; $left++) { if($hold[$left] == $hold[$left+1]) { return 0; } }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2023-03-22 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?