If you don't know before hand which it is, treat it as a string, downside of weak typing for those asking about relative merits of Perl on whatever course you're doing ;)if (($key ne "") && ($key !~ /^[0.]+$/ ))){
Update: Actually scratch all that JavaFan's answer is a much better solution
In reply to Re: If condition logic yielding partially correct output
by Utilitarian
in thread If condition logic yielding partially correct output
by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |