in reply to portable globbing behavior for command-line tool
bash seems to expand the wildcards into matching filenames before passing them to the perl script
You got the point. In general, UNIX shells expand metacharacters if they find a match.
I don't see anything dangerous in your push, anyway, the glob work under the UNIX shell is useless. You could avoid it using $^O (or $OSNAME if you use English) with a conditional.
I don't know what $OSNAME is under Windogs; assuming it begins with "Windows" you could just do something like:
use English ; if ($OSNAME =~ /^Windows/i) { push @files, glob($_) foreach @ARGV; }
Ciao!
--bronto
# Another Perl edition of a song:
# The End, by The Beatles
END {
$you->take($love) eq $you->made($love) ;
}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: portable globbing behavior for command-line tool
by seattlejohn (Deacon) on Jul 04, 2002 at 17:40 UTC |