Perl Monk, Perl Meditation | |
PerlMonks |
Re: Print only the matched line when process line by line from a fileby BillKSmith (Monsignor) |
on Mar 21, 2018 at 22:28 UTC ( [id://1211463]=note: print w/replies, xml ) | Need Help?? |
It is impossible to know that a fruit is not in the file until you have read the entire file. NetWallah has proposed a program that saves (but does not print) the required data as you read the file. After all the data is collected, you can decide what to print.
Bill
In Section
Seekers of Perl Wisdom
|
|