I'm working on a similer project and I get no errors
on this, I'm not sure why its not working for you.
I've formated the code a bit differtly, but nothing
has changed really.


#!/usr/bin/perl -w #url_touch.pl program file use strict; use LWP::Simple; my $url = $ARGV[0]; my $url_head; my @list; foreach $url_head(head($url)) { $url_head = "Not Given" unless defined $url_head; push( @list, $url_head); } my ($content_type, $document_length, $modified_time, $expires, $server +) = @list; print ">>$content_type<< "; print ">>$document_length<< "; print ">>$modified_time<< "; print ">>$expires<< "; print ">>$server<<\n";
--- END_OF_FILE


I do know that you have to use a fully qualifed URL for this to work

work.

www.webadept.net/index.html

won't work, I have to use the
http://www.webadept.net/index.html for it to work.
here is the command and output...

tigger$ perl url_touch.pl http://www.cjsportscards.com/index.html


>>text/html<< >>13168<< >>982047528<< >>Not Given<< >> ConcentricHost-Ashurbanipal/2.0 (XO(TM) Web Site Hosting)<<

Hope this helps..

Glenn Hefley
www.lucidmatrix.com

In reply to Re: RE: RE: Re: LWP::Simple by LucidMatrix
in thread LWP::Simple, a bug in head() function? by capa

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.