my $source = "Whatsnew.html"; my $destination = "hw5.txt";
open IN, $source or die "Can't read source file $source: $!\n"; open OUT, ">$destination" or die "Can't write on file $destination: $!\n"; print "Copying $source to $destination\n"; while(<IN>){ if(/^\s+ (\d\d\/\d\d:) #match 1st line \s* (<a\s+href [^>] +>) (.*?)\s*$ /isx ) { if(length($3) >= 1){ print OUT "$1" ,"$3 " ; } elsif(length($3)==0){ print OUT "$1"; } } elsif(/^\s*(.*?)<\/a><br>\s*$/) #match 2nd line { my $subject = $1; print OUT "$subject" ; print OUT "\n"; last if /Planning Letter PL\-329/;# ends section I care about } } _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs