s/([,;"])/\\$1/gs/([\n])/=0D=0A/gBEGIN:VCALENDAR VERSION:1.0 PRODID:PalmDesktop Generated BEGIN:VEVENT SUMMARY:COM: <$MTEntryTitle remove_html="1" $> DESCRIPTION;QUOTED-PRINTABLE:<$MTEntryBody regex="iCalReturn" remove_html="1" $> DTSTART: use Time::Local; my $mytime = timelocal(<$MTEntryDate format="('%S', '%M', '%H', '%e', '%m'-1, '%Y'-1900)"$>); $mytime = $mytime + 3600; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=gmtime($mytime); printf('%d%02d%02dT%02d%02d%02dZ',$year+1900,$mon+1,$mday,$hour,$min,$sec); DTEND: use Time::Local; my $mytime = timelocal(<$MTEntryDate format="('%S', '%M', '%H', '%e', '%m'-1, '%Y'-1900)"$>); $mytime = $mytime + 3600; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=gmtime($mytime); printf('%d%02d%02dT%02d%02d%02dZ',$year+1900,$mon+1,$mday,$hour,$min,$sec); END:VEVENT END:VCALENDAR