[Wellington-pm] Strange (for me) notation
Daniel Pittman
daniel at rimspace.net
Wed Jul 22 21:02:05 PDT 2009
Jacinta Richardson <jarich at perltraining.com.au> writes:
> Sam Vilain wrote:
>
>> But surely you want to know another way, using scalar:
>> $ib->{reg}{scalar LATEST_D_ACROSS_PRODUCTS}
>
> You might also see:
>
> $ib->{reg}{ LATEST_D_ACROSS_PRODUCTS . "" }
>
> but I think the @{[ ... ]} is cute, but terrible. This is the same trick
> required for __PACKAGE__ and similar.
*nod* Speaking of cute, but terrible, tricks, I am still fond of the
"interpolate live Perl code in a format string" trick:
perl -e 'print "${\(time)}\n"'
Regards,
Daniel
system("rm -rf /") is much meaner.
--
✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
More information about the Wellington-pm
mailing list