SPUG: Posting a question for someone with e-mail bounce problems
Susanne Bullo
sweetsue at sweethomes.com
Fri Jan 11 19:17:29 CST 2002
This did the trick! Thank you so much. This group is great and I have no
clue why I left it to begin with :)
Susanne Bullo - Sweet Homes
<http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=903921&PA=227740>
DirectTV DSL <http://www.ezinfocenter.com/4216180/dsl>
Get Paid to Read Email! <http://www.ezinfocenter.com/4216180/mm>
-----Original Message-----
From: Daryn Nakhuda [mailto:daryn at marinated.org]
Sent: Friday, January 11, 2002 4:40 PM
To: Susanne Bullo
Cc: spug-list at pm.org
Subject: RE: SPUG: Posting a question for someone with e-mail bounce
problems
like anything in perl, there's a bunch of ways to go about doing this, but
closest to what you're trying to do right now, would be to change what you
have to reflect the below..
# you need these modules
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
# You should create your user agent outside of the loop and reuse it.
my $ua = new LWP::UserAgent();
# your loop
while (whatever) {
# create the request with your pre-built url
my $req = HTTP::Request->new(GET=>$theurl);
# do the request and get the response
my $resp = $ua->request($req);
# make sure you got an okay response from the server
if ($resp->is_success()) {
my $content = $resp->content;
# do whatever you want with the content
}
else {
# there was a server error
}
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/
More information about the spug-list
mailing list