the following code snippet taken from http://perldoc.perl.org/perlrequick.html#Search-and-replace gives me
Bareword found where operator expected at blub.pl line 2, near "s/dogs/cats/r"
What's the problem here? I'm using Perl 5.12.4 on Windows XP.
$x = "I like dogs."; $y = $x =~ s/dogs/cats/r; print "$x $y\n";