Hi,
  I've never used perl before, but was told that it's pretty powerful for text 
processing.
  Here's a problem I'm trying to solve:
  I have an expression, exp1 that I need to grep for recursively over a  
directory structure.  If I find a match, I need to look at the  matching file 
and find another expression, exp2.  Both exp1 and  exp2 belong to the same 
pattern that always looks like this
  {
  exp2 "some text"
  some lines of text
  some lines of tex
  .....
  exp1
  more lines of text
  more lines of text
  ....
  }
  
  The goal of this exercise is to see what "some text" says in the files that 
contain exp1.  
  I can always read all of the files recursively line by line, save each  line 
into an array until I find exp1 and then go backwards through the  array until 
I find exp2 and see what "some text" on that line is, but I  was wondering if I 
can somehow use regular expressions over multiple  lines to do this.
  I hope this is a clear explanation of my problem.
  Any insights or pointers to resourcesare greatly appreciated!
  Thanks!
  
  
  
  
                
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!

Reply via email to