io,
can someone help me please. I am trying (for many hours) to read an html
file using a URL address and not a path.
Thanks in advance
Malcolm

This works:-

use CGI; # Use the CGI.pm module
use strict;

my ($html,$meta,$lockit,$lines,$path_to_input_file,@metas,@lines);
my $q = new CGI;

# Absolute path to input file to read html:
$path_to_input_file = "/Inetpub/wwwroot/lnks/index.html";

#THIS OPENS THE HTML FILE

open(HTML,$path_to_input_file) || die"Can't open $path_to_input_file : $!";

# Read everything in file to $meta
{ local $/;
   $html = <HTML>;
}
close HTML;

____________________

This will not work:-

use CGI; # Use the CGI.pm module
use strict;

my ($html,$meta,$lockit,$lines,$url_to_input_file,@metas,@lines);
my $q = new CGI;

# URL to input file to read html:
$url_to_input_file = "http://yes/lnks/index.html";;

#THIS OPENS THE HTML FILE

open(HTML,$url_to_input_file) || die"Can't open $url_to_input_file : $!";

# Read everything in file to $meta
{ local $/;
   $html = <HTML>;
}
close HTML;


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to