[Pdx-pm] Fwd: Re: subroutine calls CAN be string-interpolated!
Eric Wilhelm
scratchcomputing at gmail.com
Sun Mar 12 15:54:44 PST 2006
In case anyone missed the connection, I've forwarded the chunk from the
previous discussion of a closely related topic. The qr// is a
string-interpolating quote operator.
--Eric
---------- Forwarded Message: ----------
Subject: Re: [Pdx-pm] subroutine calls CAN be string-interpolated!
Date: Saturday 10 December 2005 03:43 pm
From: Andrew Savige <ajsavige at yahoo.com.au>
To: Eric Wilhelm <scratchcomputing at gmail.com>, pdx-pm-list at mail.pm.org
--- Eric Wilhelm <scratchcomputing at gmail.com> wrote:
> And you thought they had to be concatenated with that messy
> quote-breaking " . thing($stuff) . " syntax.
>
> perl -e 'use constant foo => 7, 6; print "foo: @{[foo]}\n";'
>
> Is this undocumented or just obscure?
According to:
http://www.nntp.perl.org/group/perl.fwp/3727
the @{[]} "secret operator" was invented by Randal and/or
Larry in 1994.
BTW, cog dreamed up a (presumably) vulgar name for the @{[]}
operator, as alluded to here:
http://www.nntp.perl.org/group/perl.fwp/3726
I don't know what this name is though.
-------------------------------------------------------
--
"I've often gotten the feeling that the only people who have learned
from computer assisted instruction are the authors."
--Ben Schneiderman
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the Pdx-pm-list
mailing list