From cjs@icbl.heriot-watt.ac.uk Tue Mar 7 16:43:17 1995 From: Chris J Schnurr Subject: Re: Misc. scripts for html generation Date: Tue, 7 Mar 1995 15:43:43 +0000 (GMT) > > I am trying to find a script which will extract occurances of WWW sites from > files, and combine them into a html list. For example, I have created two > html documents, each with lists of every web sits that has appeared either in > my Mail directory, or in my News directory... > After toying with perl, a friendly programmer made me the following script. It slurps all html references from standard input and puts out a sorted, mutually exclusive list to standard output. (phew!) usage : cat * | slurp.http >contacts.html --------------------------slurp.http :-------------------------------------- #!/usr/local/bin/perl print "\nMail links\n\n"; print "every http found in my mail box up to : ...
\n"; print "courtesy of a PERL script by rbk@icbl.hw.ac.uk
\n"; print "This is a pretty random way of linking..!
\n"; while (<>) { while (/^(.*)(http:\S+)(.*)$/) { $_ = $1.$3; $URLS{$2}++; } } foreach $url (sort keys %URLS) { print "$url
\n"; } print "\n\n"; --------------------------slurp.http :--------------------------------------