# New Ticket Created by Father Chrysostomos # Please include the string: [perl #129208] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=129208 > I would expect these two to be equivalent: $ ./perl -Ilib -le '$x = 4; sub {\@_; for (map {$_[0]} 1) { $_=3 } }->($x); print $x' 4 $ ./perl -Ilib -le '$x = 4; sub {\@_; for (map {shift} 1) { $_=3 } }->($x); print $x' 3 This is with v5.25.4-89-g05bda26, but the behaviour is ancient. I get the same results with 5.8.7. Depending on internal flags, map may or may not copy the value returned from the block. I believe it should always copy, but I wanted to check to make sure before making the change. -- Father ChrysostomosThread Next