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

Re: On "Command-line Wildcard Expansion"

Thread Previous | Thread Next
From:
Jenda Krynicky
Date:
August 7, 2001 15:58
Subject:
Re: On "Command-line Wildcard Expansion"
Message ID:
3B70481F.1186.6604DE3@localhost
From:           	"Tye McQueen" <tye@metronet.com>
> 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\> script.pl *.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 G.pm (or Wild.pm).
Just tell me how to name it.

	use G 'leave_empty'; # ???

Jenda

== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==
: What do people think?
What, do people think?  :-)
             -- Larry Wall in <199808071736.KAA12738@wall.org>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About