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

Re: sub return value in qq{}

by choroba (Cardinal)
on Nov 02, 2022 at 09:54 UTC ( #11147906=note: print w/replies, xml ) Need Help??


in reply to sub return value in qq{}

References (and dereferences) should work:
print qq{ monk magic ${ \b() } };

You can also use an array reference, which is great if you need more than one thing:

print qq{ monk magic @{ [b(), b()] } };

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2023-02-03 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (25 votes). Check out past polls.

    Notices?