in reply to Comparison based on type of value held by variables

eq and ne are for string comparisons. == and != are for numeric comparisons.

As for determining if something is a number, use Scalar::Util's looks_like_number() function. It's almost always accurate enough, and you don't have to maintain it. :-)


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Comparison based on type of value held by variables

Replies are listed 'Best First'.
Re^2: Comparison based on type of value held by variables
by ranjan_jajodia (Monk) on Oct 18, 2005 at 13:45 UTC
    Thanks dragonchild; I will do that.
    Regards,
    Ranjan