LiquiNUX has asked for the wisdom of the Perl Monks concerning the following question:
Dear fellow monks - once again I seek your wisdom.
Is there a way to embed the return value of a sub directly in a qq{ ... } statement? Something like
sub b{ return("bar"); } print( qq{ monk magic against foo b() } );
I've tested function references and high voltage, but I can't bring it to life.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: sub return value in qq{}
by choroba (Cardinal) on Nov 02, 2022 at 09:54 UTC | |
Re: sub return value in qq{}
by johngg (Canon) on Nov 02, 2022 at 09:55 UTC | |
by eyepopslikeamosquito (Archbishop) on Nov 02, 2022 at 11:18 UTC | |
Re: sub return value in qq{}
by davido (Cardinal) on Nov 02, 2022 at 14:16 UTC | |
Re: sub return value in qq{}
by jwkrahn (Abbot) on Nov 02, 2022 at 16:32 UTC | |
Re: sub return value in qq{}
by LiquiNUX (Novice) on Nov 02, 2022 at 10:01 UTC |
Back to
Seekers of Perl Wisdom