Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: return of assigment in list context (bug!)

by LanX (Canon)
on Jan 02, 2013 at 14:06 UTC ( #1011277=note: print w/ replies, xml ) Need Help??


in reply to Re: return of assigment in list context (bug?)
in thread return of hash-assigment in list context (bug?)

This is perl, v5.10.0 built for i486-linux-gnu-thread-multi

Thanks a lot... so it's an already fixed bug and I can stop chasing my faults! :)

Cheers Rolf


Comment on Re^2: return of assigment in list context (bug!)
Download Code
Re^3: return of assigment in list context (bug!)
by tobyink (Abbot) on Jan 02, 2013 at 15:09 UTC

    It appears to have been fixed between 5.12 and 5.14, though nothing is noted in perl5140delta.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
      Thanks!

      I browsed thru various perldelta513* w/o spotting it.

      For those interested here a one-liner for testing your perl-version:

      lanx@nc10-ubuntu:~$ perl -e '@k=( %h=(a=>42,b=>2,a=>1) ); print "$] Bu +g: @k\n" unless @k ~~ [%h]' 5.010000 Bug: b 2 b 2

      I'll gonna update a non-smartmatch solution here...

      UPDATE:

      w/o smart-match for even older perl versions (maybe the bug was introduced somewhere)

      lanx@nc10-ubuntu:~$ perl -e '%h2=@k=( %h=(a=>42,b=>2,a=>1) ); delete @ +h{keys %h2}; print "$] Bug: @k\n" if %h' 5.010000 Bug: b 2 b 2

      Cheers Rolf

      UPDATE: replace version-vars s'$^V'$]'g in code-sections

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011277]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-12-27 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls