"Colin Johnstone" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

> > > I wish to slurp in a letter template in the form of a text file and
> > > substitute fields in the letter for variables that are input on my
html
> > > form. I indicate in the text file where the substitution should take
place
> > > by the use of a <tag> like in html.

</snip>

> > the Text file looks like this
> >
> >   my %var = ('FirstName'=>'John Doe',
> >                      'time' => '12:12:56',
> >                      'date' => '2002-12-12');
> >
> >
> >   $line =~ s{<([^>]+)>} { exists( $var{$1} ) ? $var{$1} : "" }gsex;
> Vitaliy,
>
> Thank You for your help.
>
> Your solution certainly looks more elegant than mine. I did
>

<snip />

> What I would also like to do is preserve those carriage returns that
appear
> between lines in the text file as well.
>
> Any ideas ?
>

Theres also a module called Mail::Bulkmail that looks like it does exactly
what you want:

http://search.cpan.org/author/JIMT/Mail-Bulkmail-2.05/Bulkmail.pm

Todd W.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to