develooper Front page | perl.perl5.porters | Postings from December 2012

[perl #116086] split "\x20" doesn't work as documented

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
December 14, 2012 14:19
Subject:
[perl #116086] split "\x20" doesn't work as documented
Message ID:
rt-3.6.HEAD-17500-1355494740-905.116086-15-0@perl.org
On Fri Dec 14 05:07:24 2012, davem wrote:
> On Thu, Dec 13, 2012 at 10:31:18PM -0500, Eric Brine wrote:
> > On Thu, Dec 13, 2012 at 9:37 PM, James E Keenan via RT <
> > perlbug-followup@perl.org> wrote:
> > 
> > > Nonetheless, these results appear to fail to match the
documentation in
> > > a *different* way from yours, viz., they fail the specification that
> > > "any leading whitespace in EXPR is removed before splitting occurs."
> > >
> > 
> > That only applies when you pass a *string* consisting of a space.
You are
> > passing a regex. The document is quite clear about this.
> 
> I can confirm that it broke between 5.17.4 and 5.17.5:
> 
> $ perl5174  -e 'print "[$_]\n" for split  "\x20", " a b  c " '
> [a]
> [b]
> [c]
> $ perl5175  -e 'print "[$_]\n" for split  "\x20", " a b  c " '
> []
> [a]
> [b]
> []
> [c]
> $
> 
> and that the old behaviour worked back until at least 5_004_05.

I probably broke that (unintentionally).

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=116086

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