if( ref $regex eq 'Regexp' ) { print "That's an affirmative, base.\n"; }