$_ = 'C'; if ( /^B*$/ ) { print ' a match ...', "\n"; } else { print ' NOT a match ...', "\n"; }