in reply to Editing multiple xml files in perl with help of Getopt::Long and Globbing
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:
./script *.xmland handle this in your code with:
while (my $file = shift @ARGV) { next unless -r $file; # Process the file here }
would that not achieve the end result?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Editing multiple xml files in perl with help of Getopt::Long and Globbing
by Jim (Curate) on Nov 30, 2013 at 16:32 UTC | |
Re^2: Editing multiple xml files in perl with help of Getopt::Long and Globbing
by chidori (Novice) on Nov 30, 2013 at 13:17 UTC |
In Section
Seekers of Perl Wisdom