[Athens-pm] infitinite loop (yeap i made it :P)

Philip Lees pjlees at ics.forth.gr
Tue Mar 4 04:21:56 CST 2003


> 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.

I can't see why it's getting stuck in a loop, unless it's the strange
placement of 

	close USERCOUNT;

that others have already pointed out. You might want to run a short test
script to find out what while(<FILE>) returns if the file has been
closed, or just <FILE> maybe.

I have a more general piece of advice: do yourself a favour and use DBI
with a comma separated text file, one line for each user, containing all
the data you're interested in (e.g. username, password, number of
visits, etc.). Using separate files for each of these is already getting
insanely complicated and can only get worse.

It will also make it _much_ easier when you decide to move your data
into a proper database.

Philip
--
Philip Lees
Working Group on Cardiology
ICS-FORTH, Science and Technology Park of Crete
Vassilika Vouton, P.O. Box 1385, GR 711 10 Heraklion, Crete, GREECE

tel.: +30-2810-391680, fax: +30-2810-391601, e-mail: pjlees at ics.forth.gr

'The aim of high technology should be to simplify, not complicate' -
Hans Christian von Baeyer 




More information about the Athens-pm mailing list