http://qs321.pair.com?node_id=11105201


in reply to Popping from method that returns a list in one line

perl v5.20.2:

use strict; use warnings; # yadda yadda use 5.10.0; sub foo { my $ary = [1..10]; $ary } my $o = bless \do {my $x}; say "this: ", pop @{$o->foo}; __END__ this: 10

also:

use strict; use warnings; # yadda yadda use 5.10.0; sub foo { (1..10) } my $o = bless \do {my $x}; say "this: ", pop @{[$o->foo]}; __END__ this: 10
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'