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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: eq vs. ==
by chromatic (Archbishop) on Jul 20, 2003 at 17:09 UTC | |
by giulienk (Curate) on Jul 21, 2003 at 13:04 UTC | |
by Abigail-II (Bishop) on Jul 21, 2003 at 13:45 UTC |
In Section
Seekers of Perl Wisdom