Hi

I was trying the following code :

open ( fh , "test1.txt");
while (<fh>) {
$string = "the lucky coin";
if ($string =~ m/(\b)the(\s)(\b)lucky(\s)(\b)coin(\b)$/) {
print "Yup,exists.\n";
} else {
print "nope \n";
}
}
But the results are not as expected.

I was thinking of the following :
search for "the" then ignore blank spaces,tabs,newlines and look for "lucky" .If found then also print the next word which will be lucky .Is there no pipes in perl ?


mark

_______________________________________________________________________
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&wn


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to