in reply to Re: How to do that with eval ?
in thread How to do that with eval ?

my %dispatch = map { $_ => eval sprintf 'sub { $_[0] %s $_[1] }', $_ } qw/ < <= == >= > /;

Just to abstract it one more level (and get to use eval() constructively again). :-)

(There's a possibility that I'd do this in real code since I've become such an OAOO-junkie. Am I being a bit extreme here? (I usually needn't bother about speed efficiency.))

ihb