Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: problem with perl "for" loop

by esskar (Deacon)
on Mar 11, 2004 at 23:08 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-26 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found