in reply to finding multiples of two values

You don't need an if statement because the expression
$_[0] =~ /^\s*\+\-?\d+\s*$/
is evaluated before the return.

In a scalar context it returns the number of matches.

Therefore as the regex is anchored start and end, if the supplied string is an integer the regex returns 1 otherwise 0, which are evaluated as true and false. Thus the above routine could be employed as follows

if (is_integer_string($input){ do_integer_function($input); } else{ die "You must supply an integer\n"; }
You need to check if the modulus of the numbers is zero, perhaps a has_remainder function?

Hope that clarifies.