Larry has asked for the wisdom of the Perl Monks concerning the following question:
\#!/usr/local/bin/perl -w %Acts = (); use Getopt::Long; $time1= time; &Actsin1; &Group; $time2 = time; $time3 = $time2 - $time1; print "$time3 seconds\n"; print "finished"; sub Actsin1 { $filetoopen1 = "c:\\Update\\nosect\.txt"; open (ACTLIST, $filetoopen1) || die "Could not open file $filetoop +en1 \n"; open (OUTPUT2,">c:\\Update\\Errors.txt") || die "Could not open ou +tput \n"; dbmopen (%Groups, "c:\\Update\\Groups",0666) || die "Could not ope +n Acts database\n"; while (<ACTLIST>) { $TheLine = $_; @WordList = "$TheLine"; } } sub Group { $filetoopen = "c:\\update\\makeme\\statutes\.fff"; open (INPUT, $filetoopen) || die "Could not open file $filetoopen \n"; open (OUTPUT,">c:\\update\\makeme\\newstat.fff") || die "Could not ope +n output \n"; while (<INPUT>) { $TheLine = $_; if ($TheLine =~ /<RD>[^\n]*Status Compendium<<.JL>/i) { $ListPos = 0; until($ListPos > $#WordList) { if ($TheLine eq $WordList[$ListPos]) { $TheLine = ""; pop(@WordList) } $ListPos +=1 } } print OUTPUT "$TheLine"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove a line of text
by Trimbach (Curate) on Sep 21, 2001 at 02:54 UTC | |
|
Re: Remove a line of text
by dragonchild (Archbishop) on Sep 21, 2001 at 02:53 UTC | |
|
Re: Remove a line of text
by jryan (Vicar) on Sep 21, 2001 at 04:21 UTC | |
by chromatic (Archbishop) on Sep 21, 2001 at 06:08 UTC | |
by Larry (Initiate) on Sep 21, 2001 at 07:13 UTC |