#!/usr/bin/perl -w -T use strict; use CGI::Carp qw(fatalsToBrowser); use CGI; my $cgi = CGI->new; print $cgi->header; my $root = $ENV{'DOCUMENT_ROOT'}; my $datei = "test.txt"; my $new = "$root/test/newtest.txt"; rename("$datei", "$new") or die $!; if (-e $new) { print "Ist angekommen!\n"; } else { print "Nicht angekommen?\n" } exit;