AMD interview question

Write a Perl Script which will replace all occurrence of string XXX with YYY using Regular Expressions.