PugSA has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks

I've got the following piece of code that fetches a file, when the file is recieved it is only 898 bytes big does not matter what type of file or what size it previously was.

Does anyone know where I set the size limit (If that is the problem)

use LWP::Simple; my $url = "http://192.168.0.214/dbconnect/rabbithole/instructions.tx +t"; # If we get the header, the image file exists if (!head($url)) { warn "sorry, $url doesn't exist\n"; } else { # it exists, so get it and store it getstore($url,"instructions.txt") or warn "can't get image: $!"; # Print a progress message print "$url successfully stored\n"; }

Replies are listed 'Best First'.
Re: size limit on getstore
by rob_au (Abbot) on Nov 08, 2005 at 13:09 UTC
    Check the content of the created file. What is the arrangement of your network structure with respect to HTTP proxies? Are you sure the source URL exists? From your problem description, it sounds like the output which is being generated is a proxy redirection, HTML error page or alike.

     

    perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"

      Thank you it was an error file
Re: size limit on getstore
by monkey_boy (Priest) on Nov 08, 2005 at 14:21 UTC
    or maybe you only have 898 bytes free disk space ;)



    This is not a Signature...