Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
RE: RE: for loopsby mirey (Initiate) |
on Nov 02, 2000 at 04:51 UTC ( [id://39566]=note: print w/replies, xml ) | Need Help?? |
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;
In Section
Tutorials
|
|