Regular Expression Perl

$str = "gree, red, blue, blue, blue...";
$str =~ s/blue/red/;  
print $str;