#!/usr/bin/perl
# w5.3.pl regex3.pl: question mark (?)

@a = (br, bar, baar, baaar);

foreach (@a) {
  if(m/ba?r/) {print ("$_ ");}
}
#prints  br bar
