in reply to Handling both string and numeric comparisons

i never read the error message you're reporting. but if it really occours, try to avoid it with a small regex:
my $isnum = 1 if ($param =~ /^\d+$/);
another way might work with sprintf().
however, perl doesn't care for the difference between strings an numbers, as long as you don't try execute inappropriate operations on them.

language is a virus from outer space.

Replies are listed 'Best First'.
Re^2: Handling both string and numeric comparisons
by chromatic (Archbishop) on May 12, 2005 at 14:58 UTC

    Be careful with that construct. What will $isnum be if the regex is false?