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

Re: how to repeat a if else statement in a nested for loop

by Laurent_R (Canon)
on Jun 19, 2015 at 06:35 UTC ( [id://1131106]=note: print w/replies, xml ) Need Help??


in reply to how to repeat a if else statement in a nested for loop

Your two nested loops could boild down to:
for my $a (0..$i) { for my $s (0..$s) { if ($a != $s) { # do something } } }
But it really makes very little sense.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found