this approach is quite dangerous, as it reads whole FILE before grep-ing. Try to use while@error1=(grep {/0 Items in Feed & 0 New Fetched items/} <FILE>); if(@error1) { print "match found (@error1)"; } else { print"nothing"; +}
In reply to Re: printing the line after grepping
by happy.barney
in thread printing the line after grepping
by rajyalakshmi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |