my $dir = $ARGV[0]; #Getting command line argument (path of the file) foreach $file (<$dir*.xml>) # Error here when i run exe only.