Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

RE: RE: for loops

by mirey (Initiate)
on Nov 02, 2000 at 04:51 UTC ( #39566=note: print w/replies, xml ) Need Help??


in reply to RE: for loops
in thread for loops

I do not think you are looking at a scope issue. You are including code in the defenition of your for loop. Try this: for($i; $i < 50; $i++) { $j = $i + 100; $j++; print "i=$i j=$j hello!\n"; } Another question would be why do you have $j = $i + 100; and $j++; instead combine them the following way $j = $i + 101;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2020-05-27 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (162 votes). Check out past polls.

    Notices?