Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

RE: Post Election Day Perl

by Fastolfe (Vicar)
on Nov 09, 2000 at 02:55 UTC ( [id://40649]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use LWP::Simple;$_=get('http://www.cnn.com');($P,$u,$l)=m~(Bush|Gore)<
    +/\S+\s*<td\s*\S+ \S+edhead">([\d,]{9}).*?([\d,]{9})~s;$u=~s/,//g;$l=~
    +s/,//g;$d=$u-$l;print$d?"$P leads by $d votes!\n":"Tie!\n";
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
            print $l $d?"$P is leading by $d votes\n":"It's a tie!\n";
            $l->close;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://40649]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found