Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: For- loop increment not passing to inner block

by igelkott (Priest)
on Mar 30, 2008 at 20:02 UTC ( [id://677376]=note: print w/replies, xml ) Need Help??


in reply to For- loop increment not passing to inner block

Could you possibly have meant:

for (my $i = 0; $i <= 4; $i++) { my $j=0; while (my $line = readline(SORTD)) { $j++; my $number = substr($line, $j*2, 2); } }

Just a wild guess of course but when you wanted the counter of the inner loop to vary, you probably meant to have a different variable.

(There are nicer ways of writing this but I wanting the changes to be obvious.)

Log In?
Username:
Password:

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

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

    No recent polls found