develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #119897] glob in threads is broken in perl5.18

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
September 25, 2013 06:07
Subject:
Re: [perl #119897] glob in threads is broken in perl5.18
Message ID:
20130925080720.02ce6021@pc09.procura.nl
On Tue, 24 Sep 2013 21:02:45 +0200, Lukas Mai <plokinom@gmail.com>
wrote:

> On 24.09.2013 14:27, Ed Avis wrote:
> > 
> > AFAIK, glob splitting on whitespace was an accident of its original
> > implementation (which worked by running an external tcsh) and was preserved
> > for compatibility when glob became implemented by Perl code.
> > 
> > Personally I'm not a fan of this behaviour - it tends to cause bugs when
> > file or directory names contain spaces, as is nowadays common on Windows and
> > Mac systems.  The fact that split-at-space has never happened on VMS might be
> > another argument towards deprecating it.
> 
> Yes, please! You can easily get the old behavior of glob "foo bar" with
> glob("foo"), glob("bar").

No, please not. That would break

  foreach my $filename (<a b c d* ef* >) {

which would extend to quite a long and ugly line when you have to
rewrite those to globs where parens are required.

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.19   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

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