OT: Perl Cramp

--[ UxBoD ]-- uxbod at splatnix.net
Sat Oct 22 20:00:56 IST 2011


I am trying to resolve an issue with the MailScanner and ZendTo integration around how Outlook constructs HTML emails. My problem is brain cramping on Perl. Here is a code snippet: 


my $text = "<HTML 123>This is a test</HTML>"; 
my $html = "Add this first"; 

$text =~ s/(<html\S+)>(\S+)/$1$html$2/i; 

print $text . "\n"; 

What I need to happen is that $html gets inserted before <HTML 123> and keep every else as it. Hopefully a Perl guru will put me straight! 

Thanks, Phil 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20111022/78c62f8f/attachment.html

More information about the MailScanner mailing list