Hi
It is giving the found status everytime even when there are no strings:
My script:
#!/usr/local/bin/perl -w
#use strict;
#use warnings;
while (<test.s>) {
$string = "the\n\tlucky\n\t\tcoins";
if ($string =~ m/^(\s)*the(\s)*lucky(\s)*coins(\s)*$/) {
print "Yup,exists.\n";
} else {
print "nope \n";
}
}test.s doesnt have anything
$ perl x.pl Yup,exists. $
mark
On Tue, 18 Mar 2003 [EMAIL PROTECTED] wrote :
$string = "the\n\tlucky\n\t\tcoin";
if ($string =~ m/^(\s)*the(\s)*lucky(\s)*coin(\s)*$/) {
print "Yup";
}
_______________________________________________________________________ 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]
