Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use LWP::Simple;
    ($content_type, $document_length, $modified_time, $expires, $server) =
    + head $ARGV0;
    printf "$content_type <> $document_length <> $modified_time <> $expire
    +s <> $server\n";
    
  2. or download this
    bash$ ./test_head.pl http://localhost/tmp
    text/html <>  <> Apache/1.3.9 (Unix) Debian/GNU PHP/3.0.14 <>  <> 
    ...
    text/html <> 274 <> 953031425 <> Apache/1.3.9 (Unix) Debian/GNU PHP/3.
    +0.14 <>
    bash$ ./test_head.pl http://localhost/index.html
    text/html <> 274 <> 953031425 <> Apache/1.3.9 (Unix) Debian/GNU PHP/3.
    +0.14 <>