Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}

by Jenda (Abbot)
on Aug 21, 2003 at 21:04 UTC ( #285592=note: print w/ replies, xml ) Need Help??


in reply to Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}

Why does noone mention Interpolation.pm?

use Interpolation '=' => 'eval'; print "5 + 6 = $={5+6}\n"; print "a regexp object - ", qr[\b (?: $={MATCHES()} ) \b]x, $/; use Interpolation '/' => sub {'$' . $Interpolation::builtin{commify}-> +(@_)}; print "The total is $/{530 * 12.25}\n"; use Interpolation 'S:$$*->$' => 'sprintfX'; print <<"*END*"; dfg sdfg sdfg wearg sdfhg esrg dsf sdf dfg $S{'%.2f %03d'}{37.5}{42} dfgdfg sdfg sdfgsdfg *END* # ouch. I just found a bug in the module. # for this to work you either have to get version newer than 0.69 # or change the 'sprintfX' to 'sprintfx' on line 51 of Interpolation.p +m :-(

Jenda
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
   -- Rick Osborne

Edit by castaway: Closed small tag in signature


Comment on Re: Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://285592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-09-30 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (384 votes), past polls