Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: for loop is skipped for not so obvious reason (false)

by Anonymous Monk
on Feb 06, 2013 at 11:41 UTC ( #1017391=note: print w/ replies, xml ) Need Help??


in reply to for loop is skipped for not so obvious reason

so $lb and $la are printed just before the for loop, but not within.

Seeing how $la and $lb variables, the reason the loop is skipped is because $i <= $lb evaluates to false


Comment on Re: for loop is skipped for not so obvious reason (false)
Re^2: for loop is skipped for not so obvious reason (false)
by Anonymous Monk on Feb 06, 2013 at 11:42 UTC
    $ perl -E " my($la,$lb)=@ARGV; for ( my$i= $la; $i < $lb; $i++){ say $ +i; } " $ perl -E " my($la,$lb)=@ARGV; for ( my$i= $la; $i < $lb; $i++){ say $ +i; } " 0 0 $ perl -E " my($la,$lb)=@ARGV; for ( my$i= $la; $i < $lb; $i++){ say $ +i; } " 1 0 $ perl -E " my($la,$lb)=@ARGV; for ( my$i= $la; $i < $lb; $i++){ say $ +i; } " 0 1 0

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-07-24 02:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (156 votes), past polls