Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: problem while searching for a pattern in a file

by kiruthika.bkite (Scribe)
on Mar 24, 2010 at 08:18 UTC ( #830478=note: print w/ replies, xml ) Need Help??


in reply to problem while searching for a pattern in a file

Hi,
I have executed your program in my system.It sent the mail only if the pattern get matched.
I have tested your code with the following input.

Input

contents of results.txt
\n
\n
\n
This is testing

In this case mail didn't send.

And,
if($line!~m/\b$pattern/)

This condition will match the pattern other than "hello".
So when newline is encountered this condition will get true.(\n!="hello").
So in this case also mail will send.


Comment on Re: problem while searching for a pattern in a file

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://830478]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2015-07-06 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls