Hi,

I came across something odd editing a script with BBEdit. The BBEdit #!
menu has a 'Run' command and a 'Run in Terminal' command. The script
below works fine when I use the Run command, but returns HTTP response
code 500 when I use Run in Terminal. I tried running it directly from
Terminal and I get the same result, HTTP response code 500.

I also noticed that getstore() returns 500 as a one-liner from Terminal
(but getprint() works fine). What gives?

Regards,
Andrew


    #!/usr/bin/perl
    
    use warnings;
    
    use strict;
    
    use LWP::Simple;
    
    my $url = 'http://www.google.com';
    
    my $file = 'Users/andrewbr/Desktop/google.html';
    
    my $res = getstore($url, $file)
    or die "Couldn't get/store $url";
    
    print $res;


Reply via email to