chiller has asked for the wisdom of the Perl Monks concerning the following question:

This is fairly low-priority, but I get this warning when running my code:
Argument "%s" isn't numeric in ncmp
The piece of code I am running operates on strings. However, I get this warning when the code receives any string starting with integers. Is this just Perl fussing when trying to determine the "type" of my variable? Can this warning be avoided somehow?

Replies are listed 'Best First'.
Re: Expecting Numeric vs. Alpha?
by VSarkiss (Monsignor) on Dec 25, 2001 at 01:13 UTC

    Yes, use the operators eq, lt, etc., instead of ==, < and so on. The former order on string rather than numeric value.