#!/usr/bin/perl -w #Tripp Hyde #sucks all the US craigslists prefixex and area IDs for use by the collective craigslist search script BEGIN { my $base_module_dir = (-d '/home2/hhhydeco/perl' ? '/home2/hhhydeco/perl' : ( getpwuid($>) )[7] . '/perl/'); unshift @INC, map { $base_module_dir . $_ } @INC; } use CGI ":standard"; use strict; use LWP::Simple; $| = 1; my ($mainURL, $states, $stateLink, $stateHome, $cities, $cityLink, $cityHome, $areaID); my ($ua, $response, $request); my (@stateLinks, @cityLinks); my $ua = LWP::UserAgent->new; print header; print "Craigslist Suck"; print ""; #get list of states $mainURL = get("http://sfbay.craigslist.org/"); if($mainURL =~ /
us states<\/h5>