Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If I run this script starting in any of the NT server webroot and other directories (f:\inetpub\wwwroot\nextDirectory) it works with no problems. It just seems to not work when I run it from web root on my NT server. Here are the modules I am using on my NT server on Perl 5.8.Use of unitialized value in hash element at F:\Perl\bin\scriptname.pl +line 32. Use of unitialized value in hash element at F:\Perl\bin\scriptname.pl +line 32. Use of unitialized value in hash element at F:\Perl\bin\scriptname.pl +line 32. Can't locate object method "host" via package "URI::_foreign" at F:\Perl\bin\scriptname.pl line 32.
Here is part of my link Extractor that is not working:use strict; use warnings; use HTML::LinkExtor; use URI; use File::Find;
Any ideas on why this is happening????my $base = 'http://webroothere.com/'; my %servers; my $p = HTML::LinkExtor->new; $p->parse_file($File::Find::name); foreach ($p->links) { # for each link found... my ($tag, %attrs) = @$_; foreach my $a (keys %attrs) { # for each attribute of link my $url = URI->new_abs($attrs{$a}, $base); next unless $url->scheme =~ /^http/; $servers{$url->host}++; #THIS IS THE LINE IT SEEMS TO ERROR + ON
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem on NT server webroot only
by BrowserUk (Patriarch) on Jul 18, 2003 at 00:00 UTC | |
by Anonymous Monk on Jul 18, 2003 at 18:30 UTC |