in reply to Problem saving webpage content into a file

Hi triticale, it may help:
use LWP::Simple; my $url = 'http://www.nasdaq.com/earnings/earnings-calendar.aspx?date= +2014-Oct-02'; my $html = LWP::UserAgent->new; my $response = $html->get($url); if ($response->is_success) { print "$response->content\n"; } else { warn("Can't get $url -- " . $response->status_line); }
Update: In according to Corion's answer you can gunzip this way:
my $uncomp_content; gunzip \$response->content => \$uncomp_content;

Replies are listed 'Best First'.
Re^2: Problem saving webpage content into a file
by Corion (Patriarch) on Oct 06, 2014 at 12:52 UTC
    print "$response->content\n";

    This likely won't print what you intend. Quotes don't interpolate to method calls.

    print $response->content, "\n";

    I think that the content has already been decompressed by WWW::Mechanize for you.