in reply to string substitution help
#!/usr/bin/perl -w use strict; $|++; use Template; my $result = Template->new ( START_TAG => '<', END_TAG => '>', )->process(\*DATA, { recp_name => 'Recipient name', send_name => 'Sender name', ## send_email => 'sender@example.com', site_url => 'http://example.com/some/place', }) || die Template->error; __END__ Hey <recp_name>, I was surfing the web and I stopped by a pretty cool site that I think + you might be interested in. It is filled with cool information, good link +s, funny pics, and more, so be sure to check it out! Here is the address of the site: <site_url>. <send_name> <IF send_email; send_email; ELSE; "[no email specified]"; END>
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: string substitution help
by emilford (Friar) on Sep 23, 2002 at 12:53 UTC |