On Wed, Dec 19, 2001 at 10:14:00PM +0100, Egor Brandt wrote:
> #!/usr/bin/perl -w
> while ( < i am fred     flintstone >) {

The text between the angle brackets is not what you're matching against;
it's either a filehandle that you're reading from, or a globbing pattern to
match files against in the current directory.  Not having Learning Perl on
hand I couldn't tell you which, but I'm guessing it's a filehandle to read
from.

If the text doesn't explain what that construct means then it should have
already been established.  Flip back through the book and read about
filehandles.


> if (/\b(fred|wilma)\s+flintstone\b/) {
> print "matched: |$`<$&>$'|\n";
> } else {
> print "no match.\n";
> }
> }


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

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

Reply via email to