$a = "$ENV{DOCUMENT_ROOT}/file1.htm"; $b = "$ENV{DOCUMENT_ROOT}/file2.htm"; rename($a, $b) || die "Uh oh, can't rename: $!";