#! /usr/bin/perl # mytest.pl $s = shift; if (isnumber $s) { print "$s is a number\n"; } else { print "$s isn't a number\n"; } #### ./mytest.pl 123.2 123.2 is a number ./mytest.pl aBcd aBcd isn't a number