Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: '+' to +

by ihb (Deacon)
on May 29, 2005 at 16:37 UTC ( [id://461535] : note . print w/replies, xml ) Need Help??


in reply to Re: '+' to +
in thread '+' to +

Like I did it in Re: Re: How to do that with eval ?:

my %arith = map { $_ => eval sprintf 'sub { $_[0] %s $_[1] }', $_ } qw[ + - * / ];

ihb

See perltoc if you don't know which perldoc to read!