From: "Rosenstein, Leon" <[EMAIL PROTECTED]>
> Currently the script reads:
> opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n";
> @filenames = readdir (DIR) or die "Can't Hold Filenames \n";
> foreach $name (@filenames)
> {if ($name eq "blah.dat") {rename ($name, "blah.old") or die "sorry
> couldnt complete task cause $!" } };
>
> C:\scriptz>perl -w open4.pl
> sorry
> couldnt complete task cause No such file or directory at open4.pl line
> 7.
The script tries to rename the blah.dat in the CURRENT WORKING
DIRECTORY, not in c:\temp !
Use
rename ("C:/temp/$name", "c:/temp/blah.old")
HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]