in reply to Override Data Display Method
This is documented in perlref. In general, this is fraught with quoting and readability problems, but it is possible. To interpolate a subroutine call (in list context) into a string:So, you could try:If you prefer scalar context, similar chicanery is also useful for arbitrary expressions:print "My sub returned @{[mysub(1,2,3)]} that time.\n";Version 5.004 of Perl had a bug that gave list context to the expression in "${...}", but this is fixed in version 5.005.print "That yields ${\($n + 5)} widgets\n";
print "Your order is for $count donuts which are specified with ${\ $d +onut->printed }<BR><BR>\n";
printf("Your order for %d donuts which are specified with %s<BR><BR>\n +", $count, $donut->printed);
++ vs lbh qrpbqrq guvf hfvat n ge va Crey :)
Nabgure bar vs lbh qvq fb jvgubhg ernqvat n znahny svefg.
-- vs lbh hfrq OFQ pnrfne ;)
- Whreq
|
|---|