Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've used this code which is similar:open(FILE, "data.txt"); #opens data.txt in read-mode while(<FILE>){ #reads line by line from FILE w +hich is the fi +lehandle for data.txt chomp; print "Saw $_ in data.txt\n"; #shows you what we have read } close FILE; #close the file.
Now, that code WORKS, but when I use it in a web-setting, it gives error 500, tho, only if you use the wrong login info... (code is from a login script) if you login correctly, it goes to a page, and seems to work properly... (The actual source is that of an error 500)open (FILE, "users"); while (<FILE>) { chomp; ($name, $value) = split(/,/, $_);
Edited by Ovid. 2001-04-25
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: file input problem
by Masem (Monsignor) on Apr 25, 2001 at 18:29 UTC | |
|
Re: file input problem
by diarmuid (Beadle) on Apr 25, 2001 at 18:57 UTC | |
|
Re: file input problem
by little (Curate) on Apr 25, 2001 at 19:05 UTC | |
|
Re: file input problem
by thabenksta (Pilgrim) on Apr 25, 2001 at 18:32 UTC | |
|
Re: file input problem
by tadman (Prior) on Apr 25, 2001 at 18:58 UTC | |
|
Re: file input problem
by elwarren (Priest) on Apr 25, 2001 at 20:10 UTC | |
|
Re: file input problem
by Anonymous Monk on Apr 25, 2001 at 19:58 UTC | |
by merlyn (Sage) on Apr 25, 2001 at 20:00 UTC | |
by thabenksta (Pilgrim) on Apr 25, 2001 at 20:20 UTC | |
by Anonymous Monk on Apr 25, 2001 at 22:56 UTC | |
by coolmichael (Deacon) on Apr 26, 2001 at 05:04 UTC | |
by Anonymous Monk on Apr 25, 2001 at 20:12 UTC | |
by diarmuid (Beadle) on Apr 26, 2001 at 17:16 UTC |