if (is_integer_string($input){ do_integer_function($input); } else{ die "You must supply an integer\n"; }