From: "Rob Dixon" <[EMAIL PROTECTED]>
> But glob 'absent_file.txt' returns ('absent_file.txt') so I think this
> does what's required. As perldoc says, glob EXPR returns the value of
> EXPR with filename expansions such as the standard Unix shell /bin/csh
> would do.

I see ... it only returns nothing if the parameter contained a * or ?

I remember having some discussions regarding this and we agreed that 
even this should survive the cmdline globbing.
So that you could print

        Cannot open file *.txt
or
        No files match the *.txt mask

If you happen to have several masks with different meanings it might 
be good to be able to say which one did not return anything.
And it may not of course :-)
I was told this is the behaviour of the Unix shells ...

> > From: "Rob Dixon" <[EMAIL PROTECTED]>
> > > Sorry to drag this one up again, but it doesn't seem to have been
> > > answered properly. Surely the answer is:
> > >
> > >     my @input_files = map glob, @ARGV;

There's one more bad thing about this code. Suppose the script was 
called like this

        script.pl "hello world.doc"

then the @ARGV = ( 'hello world')
but the line above will set @input_files to
        ( 'hello', 'world.doc' )

Not very usefull :-)

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to