if ( /^[brc]at$/ ) { print "It's an animal\n"; } if ( /^b/ ) { print "... and it flies!\n"; }