It would be helpful if you updated your post using <code></code> tags. It is not clear what your string contains as it is. You can read about <code> tags and other helpful advice about posting on PerlMonks at Writeup Formatting Tips and Posting on PerlMonks.
Your string appears to have both newline characters and "\n" escape characters. You could clarify the content by posting the output of the command od -c filename.
You might find it helpful to break your problem down into two steps: first remove the newline characters; then search for "saravanan".
In reply to Re: reading file
by ig
in thread reading file
by saranperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |