use Regexp::Common; if ( $RE{num}{real}->matches($v3) ) { print "its a good one\n"; } else { print "Not Good!!"; }