note
hippo
<p>Unless you are doing something else with other options to the script which you aren't showing us, I don't see any reason for you to do the globbing in the script. Why not just use the shell's globbing instead? If you invoke the script with:</p>
<code>./script *.xml</code>
<p>and handle this in your code with:</p>
<code>
while (my $file = shift @ARGV) {
next unless -r $file;
# Process the file here
}
</code>
<p>would that not achieve the end result?</p>
1065038
1065038