Please someone help me see the what the h I am doing wrong in this. This might actually end up being a more aspx question than perl, but anyways.

Given command line arguments for a date range, say $to and $from, I am trying to get POST data from a webpage http://somesite.com/foo.aspx. According to the source code for this page, the names of the fields I want to pre-populate are beginDate and endDate

I have a subroutine called build_tree(url) that builds an html::treebuilder tree out of any url passed to it. This is working because I have used it in other scripts. It behaves very well

my code looks like this

$url = "http://www.somesite.com/foo.aspx?beginDate=$from&endDate=$to"; $tree = build_tree($url);

For some reason, this is not behaving like it should. For some reason, the returned content looks like I built a tree from http://somesite.com/foo.aspx, it seems to ignore anything after the '?'.

Can anyone spot what im doing wrong? Is this question more suited to an aspx site? Please help, or please point me in the right direction.

Many thanks


In reply to POST to an aspx destination by TendulkarIsGod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.