On Dec 17, 2003, at 7:59 AM, Hemond, Steve wrote: [..]
I am searching this way : if ($text =~ /one two/)
What I am doing wrong?
ok, I bite, what is the problem?
given #!/usr/bin/perl -w use strict; while ( <DATA> ) { my $text = $_; if ($text =~ /one two/) { print "line is ok:\n\t$text"; } else { print "WRONG!\n\t$text"; } } __DATA__ If 'one two' is found, it is okay. If 'one' is found, it is incorrect. If 'two' is found, it is also incorrect.
we get line is ok: If 'one two' is found, it is okay. WRONG! If 'one' is found, it is incorrect. WRONG! If 'two' is found, it is also incorrect.
What Problem?
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>