Re: Naming the @{[]} operator
[email protected] (Bart Lateur) Thu, 13 Jul 2006 11:26:39 +0200
| Newsgroups | perl.fwp |
|---|---|
| Organization | Me, Myself and I |
| Message-ID | <[email protected]> |
On Thu, 13 Jul 2006 04:29:38 -0400, Chasecreek Systemhouse wrote: >On 7/7/06, Jerrad Pierce <[email protected]> wrote: > >> perl -le 'print "@{[time]}"' > >What the advantage the above over this: > >perl -le 'print time' Oh come on, you asked how to use @{[]}. Well, its main purpose is a way to embed ("interpolate") a function call into a string. Like, uh, perl -le 'print "<<<@{[time]}>>>"' If I need to do this often in one script, I prefer to load the module Interpolate. -- Bart.