develooper Front page | perl.perl5.porters | Postings from August 2001

Re: On "Command-line Wildcard Expansion"

Thread Previous | Thread Next
Jenda Krynicky
August 7, 2001 15:58
Re: On "Command-line Wildcard Expansion"
Message ID:
From:           	"Tye McQueen" <>
> Excerpts from the mail message of Jenda Krynicky:
> )
> ) > That is a bit misleading.  glob("foo-^&#@") is "foo-^&#@"
> ) > (at least under Win32).  
> ) 
> ) Beg your pardon???
> ) 
> ) perl -e "print glob('foo-^&#@')"
> ) perl -e "use File::DosGlob qw(glob);print glob('foo-^&#@')"
> ) perl -e "use File::Glob qw(glob);print glob('foo-^&#@')"
> ) 
> ) All these return NOTHING.
> For me, (perl v5.6.0), the first returns the strings.  My
> previous testing of File::DosGlob must have been flawed
> as it returns nothing in today's testing.  But that doesn't
> affect my argument as I already said that glob() returning
> nothing should restore the original argument. :)

Well that realy depends. Imagine you have a script that is supposed 
to process a list of files and you call it like this :

c:\some\dir\> *.txt *.html

Now if there are some TXT files but no HTML the script will get 
something like

@ARGV = ('one.txt', 'two.txt', '*.html');

and will most probably report that it can't open a file named
'*.html'. I as a user would be quite surprised by such a message.

Anyway it's easy to add such an option to (or
Just tell me how to name it.

	use G 'leave_empty'; # ???


== == ==
: What do people think?
What, do people think?  :-)
             -- Larry Wall in <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About