go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It may be just a copy-and-paste artifact, but this line: foreach my $readLine (PASSWD) {should have angle brackets: foreach my $readLine (<PASSWD>) {(Surmise: he's not using strict.) Now, if that loop does nothing, the rest of the program will truncate the file and write a single line to it, the result you're seeing. Of course, File::Slurp doesn't have this problem because the loop isn't needed. The fact that it works sometimes makes me think there may be something else going on, but this is something to check. HTH In reply to Re: Questions with sysopen (code)
by VSarkiss
|
|