#!/usr/bin/perl -w #tells PERL to display warnings for syntax #This section will contain the listing of variables #this is the string for the break command my $file_name = shift; #This is the file to read in my $break_name = shift; #This is the string we are looking for my $counter1=0; #This is a simple counter #This will open the main.html file to read in information open(INFILE, $file_name) or die "Can't open file\n"; while(){ #until we print a break until($counter1=1) { #if you see a break
if (/$break_name/) #if you locate a the first break { #enter onto a new line and place another break #CODE GOES HERE #increment counter to 1 so it doesn't continue doing it $counter1++; }#end if }#end of until }#end of while loop ####
  • Jul 2007