use strict;
my $str = '<iframe width="425" height="349" src="http://www.youtube.com/embed/8tPnX7OPo0Q" frameborder="0" allowfullscreen></iframe>';
my $regex = qr/src=(['"])(https?:\/\/[^ >]*?youtu\.?be[^ >]+?)(?=\1)/p;
my $subst = 'src=\\1\\2?wmode=transparent';
my $result = $str =~ s/$regex/$subst/r;
print "The result of the substitution is' $result\n";
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html