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

Just to be clear, an if/elsif/elsif/.../else structure is typically faster than a dispatch hash, but doesn't scale as well to large numbers of possibilities. Scalability is like an 18-wheeler, great for doing a lot with lots of data, but for daily use the sports car is likely faster and loads more fun.

A better reason to use a dispatch hash is because you prefer how it lets you organize a piece of code.