in reply to Command Line Open Files
In unix, this is already done by the shell
$ perl -le'print for @ARGV' a.xml a.xml $ perl -le'print for @ARGV' *.xml a.xml b.xml $ perl -le'print for @ARGV' foo/*.xml foo/x.xml foo/y.xml
To handle Windows too, you just need to add the following code to your script:
BEGIN { if ($^O =~ /MSWin32/) { require File::Glob; @ARGV = map File::Glob::bsd_glob($_), @ARGV; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Command Line Open Files
by Herkum (Parson) on Sep 15, 2009 at 01:19 UTC |