Could you post the HTML? Checking out your form tag might help (I'm wondering offhand if you are using and enctype of "multipart/form-data" I think doesn't work with GET. I'll have to double check).

Your GET data should be in %ENV{ 'QUERY_STRING' }. Try printing that directly to the screen. If it doesn't have anything, then your GET data is not being sent. You could also check your server access logs as that will contain the query string if you use GET.

Other comments: You haven't used warnings, strict, or taint checking. Perhaps this is just a minimal test case you're showing us, but these issues are very important.

Final note: your regular expression could use some work. Right now, if someone types an extra forward slash, it will break. Assuming that you only have numbers for month, day, and year (with a four digit year), the following regex will work better:

my ( $month, $day, $year ) = ( $startdate =~ m%(\d\d)/(\d\d)/(\d\d\d\d +)% );

See Death to Dot Star! for details.

My apologies if this post seems like overkill!

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to (Ovid) Re: CGI POST vs. GET problem by Ovid
in thread CGI POST vs. GET problem by Anonymous Monk

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.