Robert has asked for the wisdom of the Perl Monks concerning the following question:
I'm running this with admin. privileges on a few servers. Every time I run the script, it says it cannot create the TMP file handle.(File or directory does not exist). Could someone give me a hand? Thanks, Robert$file = 'Win.ini';\n $tmp = "$file.tmp";\n chdir ("\\\\servername\\winnt") || die "$!\n";\n open (FL, "$file") || die "$!\n";\n open (TMP, ">$tmp") || die "$!\n";\n while (<FL>){\n $_ =~ s/als/ald/g;\n print TMP $_;\n }\n close FL || die "$!\n"; \n close TMP || die "$!\n";\n rename ($file,$file.old) || die "$!\n";\n rename ($file.tmp,$file) || die "$!\n";\n
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remote Pipe
by plaid (Chaplain) on May 31, 2000 at 05:21 UTC | |
|
Re: Remote Pipe
by Robert (Initiate) on May 31, 2000 at 05:39 UTC | |
by mdillon (Priest) on May 31, 2000 at 05:57 UTC | |
by mikfire (Deacon) on May 31, 2000 at 06:13 UTC | |
by mdillon (Priest) on May 31, 2000 at 06:55 UTC | |
by btrott (Parson) on May 31, 2000 at 06:40 UTC | |
by mdillon (Priest) on May 31, 2000 at 06:51 UTC | |
by Robert (Initiate) on May 31, 2000 at 06:15 UTC | |
by mikfire (Deacon) on May 31, 2000 at 06:25 UTC |