in reply to Re^2: Making tmp copies of files
in thread Making tmp copies of files

This isn't going to work. $1 isn't defined as no capture has taken place.

Try this.
# For foo.htm => foo.htm.tmp opendir( HTMLSTORIES, "$html_dir") || die "HTML files do not exist: $! +"; @FigureArray = grep{/\.htm$/} readdir ( HTMLSTORIES ); foreach $figfile (@FigureArray) { copy ($figfile, "$figfile.tmp") or die "Can not make temporary cop +y of file [$figfile]: $!"; }
BTW, make copies of the original before overwriting them. The last thing you want to do is blow them all away and realize you don't have backups.


-Lee
"To be civilized is to deny one's nature."