Is there in Perl any function to determine if the contents of a string is numeric?
Something that behaves like:
#! /usr/bin/perl # mytest.pl $s = shift; if (isnumber $s) { print "$s is a number\n"; } else { print "$s isn't a number\n"; }
Then when you call it:
./mytest.pl 123.2 123.2 is a number ./mytest.pl aBcd aBcd isn't a number
In reply to A function to determine if a string is numeric by juliosergio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |