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.

Whether this behaviour is a Good Thing is a separate question though, and
puts me up against innumerable fanatical Unix users :-D

/R

"Jenda Krynicky" <[EMAIL PROTECTED]> wrote in message
3E121902.10341.380E85D6@localhost">news:3E121902.10341.380E85D6@localhost...
> 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;
> >
> > which will also leave @input_files empty if @ARGV is empty.
>
> The problem is that it will also glob the stuff that should not have
> been globbed. And if the script was called
>
> script.pl *.txt results.log
>
> then your globbing will remove the "results.log" if it doesn't exist
> already.
> Not necessarily the best thing to do.
>
> IMHO, the best answer is
> use G; # http://Jenda.Krynicky.cz/#G
>
> 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