Can anyone get this script to work?

  #!/usr/bin/perl
  use warnings;
  use strict;
  use Compress::Zlib;
  use LWP 5.64;

  my $url = 'http://www.disobey.com/';
  my %headers = ( 'Accept-Encoding' => 'gzip' );
  my $browser = LWP::UserAgent->new;
  my $response = $browser->get( $url, %headers );

  my $data = $response->content;

  if ($response->content_encoding eq "gzip") {
      print "Server supports gzip, woo!\n";
      print uncompress($data);
  }

I've yet to get any valid response from $data, whether I'm using the
original Compress::Zlib with the OS, or the one from Fink. Any ideas?

-- 
Morbus Iff ( shower your women, i'm coming )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Tech: http://oreillynet.com/cs/catalog/view/au/779 - books, articles, log
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

Reply via email to