Thanks for all the responses, but I'm still trying to get this to work.
I put a couple of print statements in and re-ran the script sending
the output to a log: map_rename.pl > map_rename.log 2>&1

Here's the contents of the log file (I'm using only 3 files for testing)...

\'ENDPNA.PROD.HRBANS(EDIFACT)\': Cannot rename to
/iu14/s01/app/tle/richf/EDIFACT: A file or directory in the path name does
not exist.

\'ENDPNA.PROD.HRBANS(EDIFACT2)\': Cannot rename to
/iu14/s01/app/tle/richf/EDIFACT2: A file or directory in the path name does
not exist.

\'ENDPNA.PROD.HRBANS(EDIFACTO)\': Cannot rename to
/iu14/s01/app/tle/richf/EDIFACTO: A file or directory in the path name does
not exist.

renaming \'ENDPNA.PROD.HRBANS(EDIFACT)\'        --> /iu14/s01/app/tle/richf/EDIFACT
renaming \'ENDPNA.PROD.HRBANS(EDIFACT2)\'       -->
/iu14/s01/app/tle/richf/EDIFACT2
renaming \'ENDPNA.PROD.HRBANS(EDIFACTO)\'       -->
/iu14/s01/app/tle/richf/EDIFACTO


Note that before I enter the while loop I execute these 3 commands:

my $SRCDIR  = /iu14/s01/app/tle/richf;
my $DESTDIR = /iu14/s01/app/tle/richf;

chdir $SRCDIR or die "$SRCDIR: $!\n";

while (<*>) {
....
}

All the directories in question do exist, and for testing purposes $SRCDIR
and $DESTDIR are the same.
It seems to me the problem is that the backslashes I insert before the
single ticks
to escape them are getting misinterpreted...
In other versions I've also escaped the dots and the parens in a similar
way.

Any other thoughts?
Thanks for any help!!

richf



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to