if ( $ref == int($ref) and $ref eq int($ref) and $ref > 0 ) { print "$ref is a positive int!\n" }