[oak perl] Perl scripts.....

M. Lewis cajun at cajuninc.com
Sun Dec 1 01:18:20 CST 2002


5 minutes huh ? Sounds like a challenge. Maybe I should study it to
figure out what I did just in case there is a question or two.

Sure.

M

On Sat, 2002-11-30 at 23:04, George Woolley wrote:
> Mike,
> Any chance you'd give a lightning talk on this script?
> It could consist of:
>    * something like you say in your post before
>      the listing
>    * followed by a friendly smile 
>    * followed by the words "Are there any questions?"
>           or if you prefer to not answer questions
>      followed by the words "Thank you."
> Or whatever. 
> But it must be under 5 minutes or it's not a lightning talk.
> 
> But the truth is you would likely not escape questions
> (and commentary too) 
> because these would come at a break or after the meeting,
> if you do handle them right after the talk.
> Oh, well!
>     --- George
> 
> All,
> Anyone else want to (or willing to) give a lightning talk?
> Maximum: 5 minutes. 
> Minumum: none. Really, as short as you want.
>     --- George 
>    
> 
> On Saturday 30 November 2002 10:17 pm, M. Lewis wrote:
> > I told George of this script a couple of days ago. He thought it was a
> > good practical use for Perl.
> >
> > My G/F is Jewish. She has a hard time remembering to light her candles
> > on Fridays. I had an equally hard time remembering to remind her. Enter
> > perl....
> >
> > Again, I setup a cron job like so:
> >
> > 30 16 * * 5 /home/cajun/HOME/perl/candles/candles.pl
> >
> > Then a short Perl script to do the work. It sends a text message to her
> > cell phone at 430pm on Fridays. It also sends the same reminder to me
> > just so I know it worked. (I munged the phone numbers to protect the
> > innocent):
> >
> > #!/usr/bin/perl -w
> > use strict;
> >
> > use MIME::Lite;
> >
> > my @recipients = qw( 4155551212 at mobile.mycingular.com
> >                      5105551212 at mobile.mycingular.com
> >                    );
> >
> > my $wait_time = 900;  # 900 seconds is 15 minutes
> > my $debug = 0;
> >
> > my @messages = (
> >        "It's Friday. It's candle day. Don't forget...",
> >        "It's going to be dark soon. Remember it is candle day...",
> >        "Last warning. Candle day..."
> > );
> >
> > my $total = @messages;
> > my $index = 1;
> >
> > foreach (@messages){
> >    &send_message($_);
> >    if ($debug) {print "Index is: $index\n"};
> >    if ($index < $total){
> >       if ($debug) {print "Sleeping $wait_time seconds\n"};
> >       sleep $wait_time;
> >       $index++;
> >    }
> > }
> >
> > sub send_message{
> >     if ($debug) {print "Sending message: $_\n"};
> >     my $msg = MIME::Lite->new(
> >                 From    =>'cajun at cajuninc.com',
> >                 BCc     =>"@recipients",
> >                 Subject =>"",
> >                 Type    =>'TEXT',
> >                 Data    =>$_
> >                 );
> > $msg->send;
> > }
> 
> _______________________________________________
> Oakland mailing list
> Oakland at mail.pm.org
> http://mail.pm.org/mailman/listinfo/oakland
-- 
  
  Backup not found: A)bort, R)etry, M)assive heart failure?
 11:15pm  up 8 days, 22:54,  5 users,  load average: 3.16, 1.67, 1.29
  
  Linux Registered User #241685  http://counter.li.org




More information about the Oakland mailing list