#!/usr/bin/perl
# w5.6.pl regex6.pl: greedy turned off with a question mark (?)
$_ = "barbaar";
s/b.*?r/foo/;
print ("$_");

#prints  foobaar (matches bar; replaces it with foo;)

