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!
In reply to Re^2: '+' to +
by ihb
in thread '+' to +
by NateTut
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |