develooper Front page | perl.perl5.porters | Postings from January 2020

Re: Bug in format introduced in 5.27.6

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
January 21, 2020 12:07
Subject:
Re: Bug in format introduced in 5.27.6
Message ID:
20200121130550.30152a2c@pc09.procura.nl
On Tue, 21 Jan 2020 12:49:16 +0100, "H.Merijn Brand"
<h.m.brand@xs4all.nl> wrote:

> perl -le '$~ = "L02"; { local $~ = "$~h"; print $~; }'

FWIW, same for
  perl -le '$~ = "L02"; { local $~ = $~."h"; print $~; }'

I had to assign $~ to a lexical for the workaround

  perl -le '$~ = "L02"; { my $f = $~; local $~ = $f."h"; print $~; }'

> up to and including perl-5.27.5, this would print "L02h"
> as of 5.27.6 this prints "h"
> 
> this breaks production code :(

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.31      porting perl5 on HP-UX, AIX, and Linux
https://useplaintext.email  https://tux.nl  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