Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by Jenda (Abbot)
on Aug 21, 2003 at 21:04 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found