So far there is no evidence of a script called download.pl in your examples, just the URL. I am skeptical it exists because it would mean you are mixing CGI with Catalyst and using nearly the same names. In your Catalyst application, instead of download.pl there will be a URL path like /app_name/controller_name/download or host:port/controller_name/download if you are running on a high port or using the development server. In those cases, my answer is the right one.

Catalyst has many parts, including simple deployment, that are extremely difficult for a beginner and it looks like maybe you are reading Catalyst documentation and CGI documentation (perhaps from a webhost?) and trying to mix them. It can be done, it works very badly but it's possible. Your code is wrong for that approach too and I highly discourage it. :( Better to go with vanilla CGI if on a budget host where CGI is the only deployment option.


In reply to Re^3: How to move hard coded URL in tt files to a Catalyst module file by Your Mother
in thread How to move hard coded URL in tt files to a Catalyst module file by alwynpan

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.