jasonk@critter% cat foo.pl #!/usr/bin/perl -w ################## open(OUT,">/tmp/testfileA"); print OUT "This is testfileA\n"; close(OUT); open(OUT,">/tmp/testfileB"); print OUT "This is testfileB\n"; close(OUT); open(IN,"/tmp/testfileA"); system("mv /tmp/testfileB /tmp/testfileA"); print ; jasonk@critter% ./foo.pl This is testfileA