On Tue, 12 Apr 2005, Wagner, David --- Senior Programmer Analyst --- WGO wrote:

> Chris Devers wrote:

> > Also, as a side note, if $whichForm is numeric, you should just use 
> > the nueric comparisons rather than the string ones:
> > 
> >     if $whichForm eq "123"   # bad!
> >     if $whichForm = 123      # good!
>
>               Good if = becomes == otherwise doing assignment and not compare.

D'oh!

Also, as a side note, test what you write before hitting send :-)

    if $whichForm eq "123"   # bad! works, but in the wrong way
    if $whichForm = 123      # awful! doesn't even work!
    if $whichForm == 123     # good! works, and works numerically

Sorry about that :-)
 

-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to