There are lots of other factors to consider.  Boston.pm may be a list of
mostly people near Boston with a lot of Perl expertise, but I bet there
are only a few looking for a job and fewer with the specific web
experience need and even fewer willing to travel to Wellesley. 
Personally, I didn't even consider this job since it's not in Boston. 

I recommend posting to craigslist.  I see a lot of good postings there
(not enough Perl, though).

For the amusement of fellow mongers (and to keep this on topic), I
attached a perl script I wrote that runs every hour (using CRONw on
windows) that grabs new craigslist job postings based on my search
criteria and emails them to me.  It also grabs new slashdot articles.  I
changed the user names, passwords, and cookies to preserve my privacy.

Drew Taylor wrote:

>Hi fellow mongers,
>Sorry for the vague title. This is not a job posting, but it's related 
>to one previously posted. My former employer is looking for a full-time 
>replacement for me (having already quit in Jan but continuing on as a 
>consultant). See previous job posts for CareScout if you're interested. 
>The problem is that they have gotten either few responses, or few 
>qualified applicants (I'm not sure which). So much so that he's 
>considering switching from the existing LAMP(erl) framework to a 
>windows-based one.
>
>So my question is this: are there any _good_ perl developers out there 
>looking for work, or are people just much more picky about the 
>environment/money these days? I'd hate to lose my elegant web 
>application (CGI::Application, CDBI, TT/H::T) to a windows solution, 
>even if I'm not developing it any more... Is perl on the way out in 
>Boston?
>
>Drew
>
> 
>_______________________________________________
>Boston-pm mailing list
>[email protected]
>http://mail.pm.org/mailman/listinfo/boston-pm
>
>  
>

-- 
Sincerely       *Duane Bronson*
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.nerdlogic.com/
453 Washington St. #4A, Boston, MA 02111
617.515.2909

#!/usr/bin/perl -w
#
#  Written by Duane Bronson
#       last modified 5/25/05
#
# search for and change:
#  [EMAIL PROTECTED]
#  domain.com:443
#  159330::NoPeekingAtMyCookie
#  xyzzy
#
#  and customize these to your needs:
#  .htseen  - file name to keep "seen" web pages
#  @rssfeeds  - array of rss feeds
#

use strict;
use Date::Parse;
use MIME::Entity; #from MIME-tools
# use Env;
# use XML::Parser;
use HTTP::Request;
use HTTP::Cookies::Netscape;
use LWP::UserAgent;
use Data::Dumper;
use Net::SMTP;

# Create web agent and give it a cookie jar.
my $ua = new LWP::UserAgent;
my $cookie_jar = HTTP::Cookies::Netscape->new();
$cookie_jar->set_cookie(0,'user','159330::NoPeekingAtMyCookie','/','slashdot.org',undef,0,'',1333333333,0,{},);
# my $cookie_jar = HTTP::Cookies::Netscape->new(file=>'C:\Documents and 
Settings\dsb\Application 
Data\Mozilla\Firefox\Profiles\default.ndb\cookies.txt');
$ua->cookie_jar($cookie_jar);
# $ua->redirect_ok(1);

# Set up email properties
my ($firstpath,$firstfile,@rest,$fh);
my $to = '[EMAIL PROTECTED]';
my $cc = "";
#  I run a mail server on 25 and 443 to get past corporate virus firewalls
my $smtp = Net::SMTP->new('domain.com:443');  # smtp server and port
$smtp->auth('[EMAIL PROTECTED]','xyzzy') || die "no authorization to send 
email";

# load seen table from current directory
my %seen;
if (open (SEEN,"<.htseen")) {
    my $oldest = time - 60*60*24*40; #ignore 40 day-old news
    while (<SEEN>) {
        chomp;
        my ($key,$value) = split ("\t");
        $seen{$key} = $value if ($value > $oldest);
    }
    close(SEEN);
}

$| = 1;

# my $mainpage='http://slashdot.org/index.rss';
my @rssfeeds = (
    
"http://boston.craigslist.org/cgi-bin/search?areaID=4&subAreaID=0&query=%22job+location+is+cambridge%22&cat=eng&format=rss";,
    
"http://boston.craigslist.org/cgi-bin/search?areaID=4&subAreaID=0&query=%22job+location+is+boston%22&cat=eng&format=rss";,
    
"http://boston.craigslist.org/cgi-bin/search?areaID=4&subAreaID=0&query=%22job+location+is+downtown%22&cat=eng&format=rss";,
    
"http://boston.craigslist.org/cgi-bin/search?areaID=4&subAreaID=0&query=%22job+location+is+cambridge%22&cat=sof&format=rss";,
    
"http://boston.craigslist.org/cgi-bin/search?areaID=4&subAreaID=0&query=%22job+location+is+boston%22&cat=sof&format=rss";,
    
"http://boston.craigslist.org/cgi-bin/search?areaID=4&subAreaID=0&query=%22job+location+is+downtown%22&cat=sof&format=rss";,
    "http://slashdot.org/index.rss";,
    );
foreach my $feed (@rssfeeds)
{
    my $request = new HTTP::Request 'GET', $feed;
    my $response = $ua->request($request);
    if ($response->is_success) {
        $_ = $response->content;
        # my @pages = m/<rdf:li rdf:resource="(http:\/\/\S+?from=rss)" \/>/g;
        my %pages = m/<item 
rdf:about="(http:.*?)">.*?<dc:date>(.*?)<\/dc:date>/sgi;
        if (!%pages) {
            die "Can't find any items in:\n$_";
        }
        mailpages (\%pages,\%seen);
    }
    else
    {
        print "error: from $feed" . $response->error_as_HTML . "\n";
    }
}

sub mailpages
{
    # print "Recieved Pages\n" , Dumper [EMAIL PROTECTED];
    my $pages = shift;
    my $seen = shift;
    my $page;
    foreach $page (keys %$pages) {
        my $date = localtime (str2time($$pages{$page}) || time);
        $page =~ s/&amp;/&/g;
        if (!$$seen{$page}) {
            print "New Page: $page\n";
            my $webpage = $ua->request(HTTP::Request->new('GET', $page));
            if ($webpage->is_success) {
                my $content = $webpage->content;
                my $base = "";
                if ($page =~ m/http:\/\/.*?\//) {
                    $base = $&;
                }
                my $subject = "RSSFEED";
                if ($content =~ m/<TITLE>([^\n]+)<\/TITLE>/i) {
                    $subject = $1;
                }
                # change base
                $content =~ s/<HEAD>/<HEAD><BASE HREF="$base">/i;
                # disable Javascript
                $content =~ s/<(NOSCRIPT|SCRIPT).*?<\/(NOSCRIPT|SCRIPT)>//sgi;
                # print $content;exit;
                if (sendhtml($content,$subject,$date,$base,$page)) {
                    $$seen{$page} = time;
                }
            }
        }
    }
}

sub sendhtml
{
    my $html = shift;
    my $subject = shift;
    my $date = shift;
    my $from = shift;
    my $website = shift;

    my $msg = new MIME::Entity->build(
                From        => $from,
                To          => $to,
                Cc          => $cc,
                Subject     => $subject,
                Boundary    => '---EATMYSHORTS111222333',
                Type        => 'text/html',
                Date        => $date,
                "X-Website" => $website,
                Data        => $html);

    return $msg->smtpsend(Host => $smtp,
                        To => $to,
                        Cc => $cc,
                        Mailfrom => $from,
#                     Debug => 1
                        );
}

$smtp->quit;
if (open (SEEN,">.htseen")) {
    my $key;
    foreach $key (keys %seen) {
        print SEEN $key,"\t",$seen{$key},"\n";
    }
    close(SEEN);
}
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to