in reply to Re: I don't use printf enough
in thread I don't use printf enough
I've long seen @{[stuff]} used for interpolation, but that saves only one character over interpolation (5 vs 6 chars), is unclear, and puts stuff into the wrong context.
By contrast what you've pointed out takes 4 characters, is unclear, but puts things in the right context. However it is a bit fragile.
I wonder why I haven't seen this pointed out before?
I'll definitely be remembering this, if for no reason than golf. But while I prefer it to the @{[...]} interpolation method, I still prefer concatenation over both.
UPDATE: Reminder to self, always test assumptions...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: I don't use printf enough
by sauoq (Abbot) on Oct 25, 2003 at 08:14 UTC |