zing has asked for the wisdom of the Perl Monks concerning the following question:
Hi all. I have this file
What I want is to go through this list in a selection of three.Processing 12312 2343434 34344 Processing 12123 34343 Processing 12443 3434 3434 23434 Processing 1213 33434 Processing 96668 343 Processing 667 343 3437 Processing 67 63 47 7 Processing 6 667 23434 343 3434 Processing 88668
1. After the first occurrence pattern "Processing" i have 3 lines.Save these three lines in a separate file.save the file size of this file in variable "a"
2. After 2nd occurrence of "Processing", I have 2 lines.Save these 2 lines in a separate file.save the file size of this file in variable "b"
3. After 3rd occurrence of "Processing", I have 4 lines.Save these 4 lines in a separate file.save the file size of this file in variable "c"
Now I'd perform an operation $a+$b/$c >> RESULT.txt.Then select other triplet i.e. 4th,5th and 6th occurence of "Processing" save tyhe calculation to RESULT.txt and so on
Back to
Seekers of Perl Wisdom