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


in reply to eq vs. ==

Also somewhere in the documentation is noted that == is much cheaper than eq, so you may wanna use == whenever it makes sense.

UPDATE: i guess there is some misunderstanding here. My line above saying "so you may wanna use == whenever it makes sense" must be read as "please use == when comparing something that should be a number, because using eq to compare two numbers is much less efficient". On the other side using == to compare two strings is less likely to give the result you want, so i didn't consider that case. Hope now it's clear.


$|=$_="1g2i1u1l2i4e2n0k",map{print"\7",chop;select$,,$,,$,,$_/7}m{..}g