|
|
| Welcome to the Monastery | |
| PerlMonks |
Matching numeric digits in stringsby flemi_p (Novice) |
| on Jan 10, 2007 at 11:59 UTC ( #593887=perlquestion: print w/ replies, xml ) | Need Help?? |
|
flemi_p has asked for the
wisdom of the Perl Monks concerning the following question:
Hi All,
Thanks for your help before I start. I need to use Perl again, having used it very elegently and successfully ages ago to interrogate a log file. In this case the log file is <INFILE>. I want to match each line in this file with each reqid in <REQIDS_FILE>. I iterate over the <REQIDS_FILE> and for each reqid I then iterate over <INFILE>, outputting any line matching the reqid. When a matched line also contains an SQL SELECT statement, I also need to output the next 3 lines in <INFILE>. The issue is checking for the existence of reqid in the line from <INFILE>. As you can see from the code, I've tried some stuff but I never get to the MATCHED statement. The logic is not correct nor is the code complete. The reason for this is that I suspect what I'm trying to do is second nature to many of you. I can post compiled code if you need it. Any help is much appreciated. Thanks again.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||