|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re: Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}by Juerd (Abbot) |
| on Aug 21, 2003 at 16:31 UTC ( #285513=note: print w/ replies, xml ) | Need Help?? |
|
It's important to know that simple string concatenation is more efficient, and often much easier to read. An explicit join on space or $" is more efficient than using @{[]}. Easiest to read imho is (s)printf.
The idiom is also explained in perlfaq4's How do I expand function calls in a string?. Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In Section
Meditations
|
|
||||||||||||||||||||||||