use strict; use warnings; my @file; my $file1; my $file2; print "Please enter the name of the file to copy.\n"; use FileNamePrep qw(&func1); open FILE, "<$file1"; while(){ push @file, $_; } close FILE; print "\nPlease enter the name of the copy destination.\n"; use FileNamePrep qw(&func2); if($file2 eq "\n"){ $file2='C:\Documents and Settings\Copy Destination.txt'; print "\nIf you did not give a destination, your new file will be found under C:\ Documents and Settings, with the name Copy Destination.txt\n"; } open LOG, ">$file2"; print LOG @file; close LOG;