Hi
bcdeery,
Looks like you forgot to login before posting your reply.
"Yes this worked. When it prints URI it gives the original url, but when I print the code to a file, I can verify that it has indeed gone to the correct page. Any idea why that is?"
It is because the content of the page is dynamically generated. The URL is the same, but the content of the page is different because you submitted the form with the values needed to process your input (inserting values into the form fields and setting "hdnAction" = "Calculate"). As for dealing with the output, I prefer to use
HTML::TokeParser or
HTML::TokeParser::Simple to parse out the data I want from the HTML tags. I prefer this method to using a regex as you can't always depend on good quality data, and these modules are tried and tested :) Read the module documentation get the drift of how to use them, I wont post an example as there are good examples to work with in the docs.
Hope this helps.
Martin
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.