Gossamer Forum
Home : General : Perl Programming :

Calculations from HTML

Quote Reply
Calculations from HTML
I would like to request help with the following:
I want to write a program which will read an HTML webpage of numerical data displayed on my screen and then perform calculations based on the data.
For example, the page I request is a horseracing virtual toteboard. The toteboard displays the amounts
which have been bet on various horses. My program would then perform calculations using the data from the virtual toteboard.

I have written a VisualBasic program which will read the HTML after I have saved the page to my hard drive. I would like for my program to be able to read the data on the screen without having to save it to my hard drive.

I believe Perl might be the way to go. Any suggestions appreciated.

Thanks,
JohnS

Quote Reply
Re: Calculations from HTML In reply to
If you are already using VB...try using ASP to parse the data through the browser.

Regards,

Eliot

Quote Reply
Re: Calculations from HTML In reply to
I suggest you learn Perl. The information you have given us is a bit ambiguous. We have no idea what your data looks like after your VB script is done nor do we know what calculations you want to perform. Parsing text and manipulating it is Perl's strongest area imho, but you need to learn how to program with it first.

-- Gordon


s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';
Quote Reply
Re: Calculations from HTML In reply to
Eliot,
Thanks for your response. I'm not sure if ASP will work. After I request the web page, I need to "intercept" it before it reaches my browser. I will then grab the data I need from the requested web page, perform calculations using the data, then in a separate window display the results of the calculations. Then the requested page can load into my browser window. Does that make sense?
The page I want to intercept and perform calculations on is at http://206.24.34.156/cgi-bin/top_frame.cgi?BLM:

or you can try http://www.brisnet.com and then go to Supertote.

I know I'm asking alot for you to respond. So if you can't I understand. Thanks -- John
If you see it maybe you will get a better idea of what I'm trying to do.

Quote Reply
Re: Calculations from HTML In reply to
Gordon,
Thanks for taking time to answer my question. Sorry I was so ambiguous.
Here is a different explanation: After I request the web page, I need to "intercept" it before it reaches my browser. I will then grab the data I need from the requested web page, perform calculations using the data, then in a separate window display the results of the calculations. Then the requested page can load into my browser window. Does that make sense? The page I want to intercept and perform calculations on is at
http://206.24.34.156/cgi-bin/top_frame.cgi?BLM:
or you can try http://www.brisnet.com and then go to Supertote. If you see it maybe you will get a better idea of what I'm trying to do.

I know I'm asking alot for you to respond. So if you can't I understand. Thanks -- John


Quote Reply
Re: Calculations from HTML In reply to
Uh...using ASP with VBscript as the scripting language will do what you want...Although Perl can do the same thing as well. But since you are using VB, it would be easier to stick with that than having to learn a different logic with Perl. Just a suggestion.

Regards,

Eliot Lee