Fenux.Net - The Life of a Geek
Posted on 1/18/2007 2:46 pm in Perl

I wrote a quick program today to filter a list of email addresses out of an old email that had been forwarded a couple times. The program itself is very simple, but it took me about 15 minutes. Most of that time was digging up the proper commands for reading in the input.

I think it's mostly because I haven't written any new Perl code in about 2 years. I need to find an excuse to write more Perl so I'm not so rusty when I need.

#!/usr/bin/perl
use IO::Handle;

open (INPUT, ")
{
        chomp $email;
        $email =~ s/^ *?>> +?(.+?),.*$/$1/;
        print "$email; ";       
}

close (INPUT);

Post a Comment

Most Recent Comments

Creative Commons License  Subscribe with Bloglines  Get Daily Wisdom!
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.
© 2000-2010 Jason Burgess