As per suggestion from Corion, what happens when you run this?

The HTTP return code is not available for get() without using the LWP::UserAgent OO interface, but this 3 lines of code should ensure that your Windows box is actually getting something (runs on my XP Perl 5.10.1). If this prints something, then it comes down to probable file naming or permission errors in your getstore() statement.

It is hard for me to understand how a new file could be created with no content if the RC is 'OK'. That would imply that you do have the permission to create the file in the first place and therefore have permission to write to it!
Testing Note: delete your "blank" output file between runs to make sure that it is actually being created and not an artifact of some previous run.

Anyway run this simple test and report back.

#!/usr/bin/perl -w use strict; use LWP::Simple; my $content = get("http://perlmonks.org/?node_id=957704"); die "blank content" unless defined $content; print $content;

In reply to Re^3: LWP::Simple Empty File by Marshall
in thread LWP::Simple Empty File by idlemind

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.