[nottingham] Hassle with perl script

From: mike (mike@redtux.demon.co.uk)
Date: Tue 08 Jan 2002 - 02:19:35 GMT


Could someone do me a favour and have a list at this perl script - its
starting to drive me nuts and I cant see whats wrong.

The idea is to translate multi page html into single page by taking urls
from contents page and then printing and combining the the pages by
reading the files names from a file but it int working.

The file list gets generated but doesn't get read.

#!/usr/bin/perl -w
open(FILES,">lista");
my @list2 = `grep 'HREF' $ARGV[0]`;
foreach $list2 (@list2){
$list2=~s/HREF="//g;
$list2=~s/(\#.*\")//g;
$list2=~s/(\")//g;
$list2=~`grep 'html' $list2`;
print FILES "$list2"};

open (FILES2,"<lista");

@filea=<FILES2>;
open (FILE3,">lista1");
foreach $filea (@filea){
%seen =();
@list3 = grep{ ! $seen{$_} ++ } @filea;}
print FILE3 @list3;
close FILE3;
open (FILE6,"<lista1") or die "cant open";
@list4=<FILE6>;
foreach $list4(@list4){
print $list4;
$file1=$list4;
open(FILEX,"<<$file1");
@file2=<FILEX>;
print @file2;

}
--------------------------------------------------------------------
http://www.lug.org.uk http://www.linuxportal.co.uk
http://www.linuxjob.co.uk http://www.linuxshop.co.uk
--------------------------------------------------------------------



This archive was generated by hypermail 2.1.3 : Tue 08 Jan 2002 - 02:21:03 GMT