<?xml version="1.0" encoding="windows-1252"?>
<node id="457438" title="LWP::Simple? Prototype mismatch?" created="2005-05-16 09:05:37" updated="2005-06-14 04:15:13">
<type id="115">
perlquestion</type>
<author id="103111">
George_Sherston</author>
<data>
<field name="doctext">
I just swept aside the dense curtain of cobwebs over the entrance to my cell and looked round the room I used to know so well but which I haven't for so long.. and my eye lighted on the [Name Space] node which I indexed ages ago.   I wrote a script then to update the index and it worked fine.   But now when I run it I get&lt;BR&gt;&lt;BR&gt;

&lt;code&gt;Prototype mismatch: sub main::head vs ($) at ns.pl line 6&lt;/code&gt;&lt;BR&gt;&lt;BR&gt;

I think this is an LWP::Simple prob... but it's a complete new one on me.  Has something change when I was in my Rip Van Winkle sleep?   &lt;BR&gt;&lt;BR&gt;If any kind monk can put me straight I'd be most grateful, and doubly glad because then I could update the wretched index.

The bit of the script that (I think) is breaking down is

&lt;code&gt;
#!/usr/bin/perl -w

use strict;
use lib '/home/httpd/lib';
use CGI qw/:standard :cgi-lib/;
use LWP::Simple;

my $text = get 'http://www.perlmonks.net/index.pl?node_id=110166';

my %names = (George_Sherston =&gt; 110166);

while ($text =~ s#&lt;a HREF="/index\.pl\?node_id=(\d+)"&gt;.+?&lt;/a&gt;&lt;BR&gt; by &lt;a HREF="/index\.pl\?node_id=(\d+)"&gt;(.+?)&lt;/a&gt; on \w{3} \d{1,2}, \d{4} at# #) {
	unless (defined $names{$3}) {
		$names{$3} = $1;
	}
}
&lt;/Code&gt;

Many thanks - it's lovely to be back in the hallowed halls.


&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-103111"&gt;
&lt;br&gt;&lt;br&gt;§ &lt;A HREF="http://www.sprogress.com"&gt;George Sherston&lt;/A&gt;
&lt;/div&gt;&lt;/div&gt;</field>
</data>
</node>
