HI! Studying 'Learning Perl, 3rd edition' I was stopped, suddenly, by C. 8's Exercise 1, using the pattern_test program. the following works fine: #!/usr/bin/perl -w
while (< alfred >) { if (/fred/) { print "matched: |$`<$&>$'|\n"; } else { print "no match.\n"; } } but when I try the following: #!/usr/bin/perl -w while ( < i am fred flintstone >) { if (/\b(fred|wilma)\s+flintstone\b/) { print "matched: |$`<$&>$'|\n"; } else { print "no match.\n"; } } i get: no match. no match. no match. no match. Im on Windows ME, MS-DOS box. Thank you for your time! egorbrandtGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com