http://www.perlmonks.org?node_id=992297


in reply to var comparison

Your question is "simple" but also complex.

My question to your question is: why?
Shorter code doesn't mean more efficient code.
Your first version is very clear and it will run quickly.
String compare is a very performant operation.
I guess that there is something about this question that you haven't told us about?

The first version will normally execute faster and it is more clear. What is the problem?