$r = qr/\bfoo/; /$r/; # matches word boundary $r = "\bfoo"; /$r/; # matches backspace