Looking for a very simplistic but more importantly fast method of getting an HTTP response code from some large files. I've tried numerous perl packages including WWW::Mechanize and WWW::Curl (among other LWP::UserAgent);, but it seems the common method in these is to perform a GET command to grab the entire file first before outputting the response code. I simply want a 200 or 404 response (such as grabbing only the info from a CURL -I command). The reason I cannot use a GET command is these are large files and the load on the server will be too much. I can probably build something from just this raw header output, but I wanted to know if something already exists out there. Thanks!

UPDATE - This is resolved. LWP does support a simple head function, which can be used in Mech. So we can do both:
$mech->head(your url)
and
$mech->get(your url)


In reply to Curl Header ONLY! by omegaweaponZ

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.