Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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

by tobyink (Abbot)
on Jan 02, 2013 at 15:09 UTC ( #1011288=note: print w/replies, xml ) Need Help??

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

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'
  • Comment on Re^3: return of assigment in list context (bug!)

Replies are listed 'Best First'.
Re^4: return of assigment in list context (one-liner for testing)
by LanX (Bishop) on Jan 02, 2013 at 16:24 UTC

    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...


    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011288]
[Discipulus]: i hope too, vacuum cleaner permitting, 2-3 afternoon to build. Or is the 1:1 serie? ;=)
[Tanktalus]: Sure, no one is active for hours and hours in the cb, so I go to upgrade the db, and then someone is active. Sheesh :)
[Discipulus]: anyway poppins probably died with the last night cold. But is not normal to see them in dec. they must pop in April
NodeReaper eyes the thorns in the side
Discipulus : the party puller!
[Discipulus]: I was trying to solve this but i'm not. my regex-fu is stuck at primary school

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2017-12-18 21:37 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (498 votes). Check out past polls.