[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    Re: Need more helpful error messages from Perl
From:       "Ron Bergin" <rkb () i ! frys ! com>
Date:       2014-11-19 14:45:46
Message-ID: 5a61a595520b64d20b3ef1e6a37de244.squirrel () webmail ! i ! frys ! com
[Download RAW message or body]

Kevin Walzer wrote:
> Running this code in Perl:
>
> use LWP::Simple;
> my $url    = "http://mywebsite.com/foo.ini";
> my $page = get($url);
>
> produced this error:
>
> sh: -c: line 0: unexpected EOF while looking for matching `''
> sh: -c: line 1: syntax error: unexpected end of file

Those error messages are coming from your shell, not perl i.e., your sh
shell is attempting to run the script and not perl.

Do you have a shebang line in the script and is it pointing to perl?

How did you execute the script?

>
> The error message in question refers to unbalanced quotes, but there
> were no unbalanced quotes in my code.
>
> This error was driving me crazy until I tried to see what was happening
> using curl. This was more helpful:
>
> curl http://mywebsite.com/foo.ini > foo.ini
>
> yielded a 404 error:  the page was missing.
>
> OK, that explains the unexpected EOF. But why the "mismatched quote"
> error in Perl? Is there any way to get more helpful error messages, i.e.
> "missing page"?
>
> --Kevin
>
>
> --
> Kevin Walzer
> Code by Kevin/Mobile Code by Kevin
> http://www.codebykevin.com
> http://www.wtmobilesoftware.com
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>



-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic