Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by shmem (Chancellor)
on Aug 28, 2019 at 23:52 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11105201]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2024-03-28 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found