#!/usr/bin/perl -w use File::Copy; copy ("file1.txt","file2.txt"); print "Content-type: text/html\n\n"; #just to check... if (-e "file2.txt"){ print "File copied"; }