Home: Perl Programming Help: mod_perl:
Finance::HSHrates Perl module

New User

May 12, 2006, 6:35 PM

Views: 16039
Finance::HSHrates Perl module

I've try using the example of this module but it just returns a blank screen so I've come up with this which is basically the module but it's still not working. Could someone take a look at this for me and give me some feedback. I just trying to pull National Mortgage rates from this site.

#### Script start ####

#!/usr/bin/perl -w

use CGI qw(:standard);
use CGI::Carp (fatalsToBrowser);
$q = new CGI;
print $q->header;

require Exporter;
use strict;
use vars qw($VERSION @EXPORT @ISA $QURL @a);

use LWP::UserAgent;
use HTTP::Request::Common;

$VERSION = '0.01';
$QURL = ("http://www.hsh.com/today.html");
@ISA = qw(Exporter);
@EXPORT = qw(&getrates);

@a = getrates();

print "30 Year Fixed: $a[0]<br>";
print "Points: $a[1]<br><br>";
print "15 Year Fixed: $a[2]<br>";
print "Points: $a[3]<br><br>";
print "1-Year Adjustable: $a[4]<br>";
print "Points: $a[5]<br><br>";
sub getrates {
my ($ua,@q);
$ua = LWP::UserAgent->new;
foreach (split(/\015?\012/,$ua->request(GET $QURL)->content)) {
push @q,$1 if /<B>\s*([0-9.]+%?)\s*<\/B>/;
return wantarray() ? @q : \@q;



May 13, 2006, 1:02 AM

Views: 16036
Re: [svoirin] Finance::HSHrates Perl module

this has nothing to do with mod_perl, and your question has been answered on one of the other forums you posted this question on.


(This post was edited by KevinR on May 13, 2006, 1:03 AM)

New User

Jun 29, 2007, 9:12 AM

Views: 15480
Re: [KevinR] Finance::HSHrates Perl module

die in fire
Attachments: bouncy-boobs.html (6.27 KB)
  fake-boobs.html (6.09 KB)
  free-big-boobs.html (6.25 KB)
  giant-boobs.html (6.26 KB)
  gigantic-boobs.html (6.16 KB)
  hot-boobs.html (6.14 KB)