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

HI,
I am having trouble with this simple code
#!/usr/bin/perl use LWP::Simple; $url = 'http://xxx.yy.com/'; getprint($url);

trying to get a local url .
i get the following error:
500 Unrecognized identifier s in argspec <URL:http://xxx.yy.com>
LWP is installed
any ideas
thanks
chimni

Title edit by tye

Replies are listed 'Best First'.
Re: LWP
by sauoq (Abbot) on Jul 23, 2003 at 06:09 UTC
    i get the following error:
    500 Unrecognized identifier s in argspec <URL:http://xxx.yy.com>

    That error looks like it is being returned by your webserver, not generated by that minimal script that you posted. Additionally, a little grepping seems to indicate that the error "Unrecognized identifier %s in argspec" comes from HTML::Parser which, afaik, isn't used by LWP::Simple or its dependencies.

    So, I'm guessing you were trying to retrieve the URL of a CGI script that uses HTML::Parser and that CGI script barfed on you.

    -sauoq
    "My two cents aren't worth a dime.";
    
      Hi,
      No its not the url of a cgi script .why is HTML::parser even involved.
      checked on HTML:Parser
      make test on the HTML parser bundle follows:
      
       Unrecognized identifier s in argspec at blib/lib/HTML/Parser.pm line 75.
      
      many such errors.
      It is basically what the code above says when i try to get the url?
      How is this module involved and what do i dp to make it work.
      It used to work 2 days ago.
      Then i installed html::parser and it stopped.
      
      Thanks
      chimni
      
        It's likely HTML::Parser upgraded a module on you if it followed dependencies.
Re: LWP
by chimni (Pilgrim) on Jul 23, 2003 at 06:05 UTC

    I also get errors while 'make test' on the LWP library
    ase/mediatypes......ok base/message.........ok base/negotiate.......ok base/response........ok base/status..........ok base/ua..............ok html/form............Unrecognized identifier t in argspec at /opt/perl +5/lib/site_perl/5.6.0/PA-RISC1.1/HTML/PullParser.p m line 39. html/form............dubious

    Edit by tye, change PRE to CODE around long lines