I have a file /tmp/file1.txt. it is like this.
Message Time: Feb 3 11:24:54
Mail From: <letter@leemaletter.com>
Mail to: <info@example.com>,<jay@example.com>
quarantine: spam-JF6LBytcy_3D.gz
Message Time: Feb 3 11:25:18
Mail From: <noreply@lankaemarketing40.info>
Mail to: <jay@example.com>
quarantine: spam-uXWM3SJ-nlB0.gz
Message Time: Feb 3 11:25:29
Mail From: <bounce@rhmarketing.info>
Mail to: <sam@example.com>
quarantine: spam-uOG8ycqZrq1s.gz
Message Time: Feb 3 11:25:47
Mail From: <jay@example.com>
Mail to: <userx@gmail.com>
quarantine: spam-FxfQDEDm-5MW.gz
Now, I want to get the output of user jay's info.
OUTPUT shoud be like this.
Message Time: Feb 3 11:24:54
Mail From: <letter@leemaletter.com>
Mail to: <info@example.com>,<jay@example.com>
quarantine: spam-JF6LBytcy_3D.gz
Message Time: Feb 3 11:25:18
Mail From: <noreply@lankaemarketing40.info>
Mail to: <jay@example.com>
quarantine: spam-uXWM3SJ-nlB0.gz
Message Time: Feb 3 11:25:47
Mail From: <jay@example.com>
Mail to: <userx@gmail.com>
quarantine: spam-FxfQDEDm-5MW.gz
How can I achieve this?
I have written a code like this. But it does NOT work?. I also need a case insensitive search
open(my $fh_daily_user_in, '<', $qfn_daily_user_in) or die("Unable to +read file \"$qfn_daily_user_in\": $!\n"); while (<$fh_daily_user_in>) { if (/jay/) { print $_ , "\n"; } }
any comment?
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |