A couple of things I would change is to add use CGI::Carp qw/fatalsToBrowser/; and then remove the chdir and put in the path $ENV{DOCUMENT_ROOT}/ into your $a and $b vars. I would also put the $a and $b between quotes.
#!/usr/bin/perl print "Content-type: text/html\n\n"; use CGI; $q = new CGI; $a = "$ENV{DOCUMENT_ROOT}/file1.htm"; $b = "$ENV{DOCUMENT_ROOT}/file2.htm"; rename("$a", "$b") || die "Can't rename $!";
In reply to Re: Cannot Rename
by AcidHawk
in thread Can't rename
by wolverina
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |