[Athens-pm] infitinite loop (yeap i made it :P)
Mark Pors
mark at dreamzpace.com
Mon Mar 3 11:07:40 CST 2003
At 07:49 03-03-03 -0800, Antonis Faragitakis wrote:
>Hi
>
>can someone tell me why this crappy code, run into an
>infinitive loop!? i've broken my head and still CAN'T
>find what the problem is.
>
>The crappy code is attached.
>
>Antonis (O apelpismenos)
This looks a bit strange:
open (USERCOUNT, $times_been_here_file) or die ("Cannot open
$times_been_here_file. perl reports: $!");
while (<USERCOUNT>) {
$times_been_here = $_ + 1;
close USERCOUNT;
}#while
The open function should have a '<' in front of the filename (but it should
die there the, so maybe that is default?).
The other thing is the close statement inside the while loop, that maybe
leaves USERCOUNT in a 'true' value?
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/athens-pm/attachments/20030303/b6b6be0a/attachment.htm
More information about the Athens-pm
mailing list