in reply to Getopt problem

First of all it is not a "Getopt problem". The error message comes from cp ins your system() calls. The logical Problem of $xmllocation and $xsllocation never being empty strings is another.

GetOptions( "u|updated:s" => \my $update, "x|XMLFile:s" => \my $xmllocation, "e|XLSFile:s" => \my $xlsfile, ); $update or die "..."; $xmllocation or print "blabla"; $xlslocation or print "blablabla"; #And in your routine system(qq(sjdks $xmlfile)) if $xmlfile; #dito for $xlsfile

I prefer the non-global method, in this case it saves variables. Consider using File::Copy for copying your files, it's better.

--
http://fruiture.de