AMD Interview Question

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