Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Popping from method that returns a list in one line

by shmem (Chancellor)
on Aug 28, 2019 at 23:52 UTC ( #11105201=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict; use warnings; # yadda yadda
    use 5.10.0;
    ...
    say "this: ", pop @{$o->foo};
    __END__
    this: 10
    
  2. or download this
    use strict; use warnings; # yadda yadda
    use 5.10.0;
    ...
    say "this: ", pop @{[$o->foo]};
    __END__
    this: 10
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2020-07-09 11:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?