#!/usr/bin/perl use MIME::Entity; my $str = 'filler text to get the first char of line 2 to be a dot______ http://google.com'; print MIME::Entity->build( Data => $str, Type => 'text/plain', Encoding => 'quoted-printable', )->as_string;