D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Perl



* Neil Williams <linux@xxxxxxxxxxxxxx> [2003-02-21 23:44:25 +0000]:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Friday 21 Feb 2003 10:36 pm, Theo Zourzouvillys wrote:
> >
> > man lwpcook ;)
> 
> One a separate note, what does this mean?
> perl -c gnupg.pl
> Prototype mismatch: sub main::head vs ($) at gnupg.pl line 3
> gnupg.pl syntax OK
> 
> The top of the script is:
> #!/usr/bin/perl -w
> use CGI qw(:standard);
> use LWP::Simple;
> use strict;
> 
> If I change this to
> #!/usr/bin/perl -w
> use CGI;
> use LWP::Simple;
> use strict;
> 
> I don't get the warning.
> 
> Is this right? What have I just done???
> 
>

The diagnostic message you received indicates a conflict in subtroutine
prototypes.

It doesn't warn you the second time because you are not exporting the
HTML shortcuts from the CGI module, choosing instead the OO interface,
so the function ``head'' is preserved within the CGI namespace.

In reference to your original query, Theo is correct to point out the
LWP::UserAgent module for jobs such as this; you may also consider a
backtick to lynx, if you like.

For endless discussion on stuff like this, you may wish to refer queries
to Devon and Cornwall Perl Mongers:

http://devoncornwall.pm.org/

[MB]


BTW, ``which laptop?'' comes up from time to time:  I mention,
therefore, that the Compaq Evo N1015v rocks. [:-)]



--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly