Im running a script that works in everything including my Unix server and My NT server except for when I run it starting in the NT server webroot (f:\inetpub\wwwroot\) it gives me the following message:
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.
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 strict; use warnings; use HTML::LinkExtor; use URI; use File::Find;
Here is part of my link Extractor that is not working:
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
Any ideas on why this is happening????

In reply to Problem on NT server webroot only by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.