I have no idea what you're asking, Anon. What do you mean by can u tell me how i would i convert that href ..name and value query string to normal staring? A few comments about what you're doing, though.
  1. Use CGI.pm - it will make your life SOOO much easier (and your script easier to read). You might have to redirect STDOUT, either within the script or on the commandline. But, that's trivial.
  2. PASS VARIABLES AROUND!! If you're calling a function, make that function completely uncoupled from your caller. You've got variables global to the function (if not global to the script!) wandering around and any of those could be compromised.
  3. If you're not already doing so, use strict and warnings. You will find a number of bugs that way. I guarantee it.
  4. Pick a consistent formatting system and stick with it. Use one that lays out your logical structure in a consistent manner.
  5. Allow your strings to go across newlines. For example, the two snippets below are equivalent to the compiler, but the second is sooo much easier to read.
    printf RSCrpt "<TR><TD ALIGN=\"left\"><A HREF=\"$cgi\?contract_number= +$prevValue&member_id=$memberID&start_date=$startMonth$startDay$longSt +artYear&end_date=$endMonth$endDay$longEndYear&search_page=%s\">%s</A> +</TD><TD COLSPAN=\"2\" ALIGN=\"center\">%s</TD></TR>\n", $_, $_, $pag +eCount{$_}; print RSCrpt '<TR><TD ALIGN="left">' . '<A HREF="' . $cgi . '?' . 'contract_number=' . $prevValue . '&member_id=' . $memberID . '&start_date=' . $startMonth$startDay$longStartYear '&end_date=' . $endMonth$endDay$longEndYear . '&search_page=' . $_ . '">' . $_ . '</A>' . '</TD><TD COLSPAN="2" ALIGN="center">' . "$pageCount{$_}</TD></TR>\n";
    That way, you have all of your &foo=bar stuff lined up and easily read. In addition, each of those prints should be in a function of their own. There is a lot of debate on when you should create a function. My rules of thumb go something like:
    1. If I use it twice, it's a function.
    2. Even if I only use it once, if it's complex and hinders readability, it's a function.
  6. And, most importantly, if you're asking for help, break the problem down to its smallest form and ask for help on that, in a general sense. I'm not going to fix your exact script (especially in its unreadable form), but I will gladly help you if you can explain what the general form of your problem is.

------
/me wants to be the brightest bulb in the chandelier!

Vote paco for President!


In reply to Re: Re: Re: Re: Use your brain before trying to use mine! by dragonchild
in thread passing parameters?? 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.