Help for this page

Select Code to Download


  1. or download this
    my @filelines = <FILE>;   #Read the entire file into an array
    my $whichline;            #Declare a variable to hold the line number
    for(my $i = 0; $i = $#filelines; $i++){  #Go through the entire array 
    +untill you find it or run out of lines
    ...
          last;
       }
    }
    
  2. or download this
    my @filelines = <FILE>;   #Read the entire file into an array
    my @whichline;            #Declare a variable to hold the line number
    for(my $i = 0; $i = $#filelines; $i++){  #Go through the entire array 
    +untill you find it or run out of lines
    ...
       }
    }
    #Now you know what lines had TEXTTOMATCH in them