Regular Expression Perl

$str="BLue, BLUE...";
$str = ~ s/blue/upbeat/ig;   
print $str;