Below is a script you can use to download the html source code for web
pages.  This allows those who don't have the LWP module and don't want to
mess with it to still access the web pages.

If you're wondering why I'm posting it here rather than to a perl list,
it's because it uses Linux specific system calls.

Glen

#!/usr/local/bin/perl

# html.cgi

# Use this script to download HTML source code from the 'net

if (!$ARGV[1]) {
    system(clear);
    print "\nProper command line format for html.cgi is:\n\nhtml.cgi <url> <local file 
name>\n";
    exit;
}

$goto = $ARGV[0];
$file = "$ARGV[1]";
system(clear);
print "\nLooking up $goto\nto be stored in local file $file.\n\n";
print "\"less $file\" will automatically be run to view the downloaded file 
on\ncompletion of this program.\n\n";
@source = `lynx -source $goto`;

open (OUT,">$file");
print OUT @source;
close OUT;

system("less $file");


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to