Thank you very much for taking the time to reply. I am sorry about the lack of clarity in my post (first time hehe). Also, sorry for the massive prints, I was using them to see which parts of the code were actually executing.
Yes you are correct, I would like to print to STDOUT just the line with john in it.
The exact output I expect is:
root# perl ult_test.pl -v john -h file1.txt john got got
Really all I'm looking for is john got got, the others just let me know the other sections were run. I ran into trouble with having the subroutine 'pars0r' print the else statement for every element/line in the list/array when all I want is the line that contains john
Thank you very much for your time. If I am still unclear at all, please let me know and I will do my best to convey better.
Sluggo
In reply to Re^2: Parsing a file line by line until a certain indice in array
by sluggo
in thread Parsing a file line by line until a certain indice in array
by sluggo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |