This is nice - but wouldn't it be better to personalize it more? You could take phrases from previous loving emails exchanged by the couple.. or phrases from love letters from others.. or just quote Smoove B.
#! /usr/bin/perl -w use LWP::UserAgent; use Carp; use Mail::Sendmail; use strict; my $mood = shift || 'smoove'; # you my $self = 'Monk'; my $email = 'monk@monastery'; # her my $chicks_name = 'Chick'; my $her_email = 'chick@hermail.com'; my @subjects = ( "hey babe...", "a short message from your lover...", "just wanted to say hi...", "oh I love you...", ); my $ua = LWP::UserAgent->new(); $ua->agent("MySmooveB/0.1 "); my @doghouse = ( 'http://www.theonion.com/onion3120/pick_up_phone_3120 +.html', 'http://www.theonion.com/onion3107/baby_please_3107.h +tml', 'http://www.theonion.com/onion3402/he_is_no_good_3402 +.html'); my @smoove = ( 'http://www.theonion.com/onion3102/treat_u_right_3102.h +tml', 'http://www.theonion.com/onion3114/think_of_you_3114.ht +ml', 'http://www.theonion.com/onion3202/bringiton.html', 'http://www.theonion.com/onion3213/let_us_freak_3213.ht +ml', 'http://www.theonion.com/onion3313/get_smooved_3313.htm +l' ); my @text; if ($mood =~ /d/) { # you're in the doghouse foreach my $x (@doghouse) { my $req = HTTP::Request->new(GET => "$x"); my $retval = $ua->request($req)->as_string; push (@text, split(/\<p\>/, $retval)); } } else { # default, is smoove foreach my $x (@smoove) { my $req = HTTP::Request->new(GET => "$x"); my $retval = $ua->request($req)->as_string; push (@text, split(/\<p\>/, $retval)); } } my @smoove_text; foreach my $t (@text) { next if ($t =~ m/(img src|script|\{|\})/); next if ($t eq ""); $t =~ s/\&quot\;/ /g; $t =~ s/\<(\/)?i\>/ /g; $t =~ s/\&(\S*)\;//g; $t =~ s/\<\/p\>//g; $t =~ s/\//\n/g; $t =~ s/\./\.\n/g; $t =~ s/Smoove B/$self/g; my @lines = split(/\n/, $t); foreach my $l (@lines) { $l =~ s/^\s*//; next if ($l eq "."); next if ($l eq ""); push (@smoove_text, $l); } } my %mail = ( To => $her_email, From => $email, Subject => $subjects[rand($#subjects)], Message => $smoove_text[rand($#smoove_text)] ); sendmail(%mail) || warn "$!";
Sure, its extra effort. But no effort is too much for my baby. Smoove out.

In reply to Re: St. Valentine's Day preperation script by selena
in thread St. Valentine's Day preperation script by silent11

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.