Re: Teach me how to fish, regexp
From: Sam Holden (sholden_at_flexal.cs.usyd.edu.au)
Date: 10/09/03
- Next message: Abigail: "Re: Opinions on "new SomeObject" vs. "SomeObject->new()""
- Previous message: James Willmore: "Re: Problem With DBI - fetchrow_array"
- In reply to: Henry: "Re: Teach me how to fish, regexp"
- Next in thread: Henry: "Re: Teach me how to fish, regexp"
- Reply: Henry: "Re: Teach me how to fish, regexp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Oct 2003 23:15:01 GMT
On Wed, 08 Oct 2003 19:21:02 GMT, Henry <henryn@zzzspacebbs.com> wrote:
>
> That said, I have to say I find the man pages the last place I want to look
> in terms of convenience. I'll have to find a web based... Done!
The risj with that is that the man pages on your system will document
the perl installed on your system. The web versions will document
some version of perl which might not be the one you are using.
Plus the man pages also document the modules you have installed, rather than
a random selection of them...
>
> Ah, much easier. Here's a relevant extract.
>
> ...Setting to "" will treat two or more consecutive empty lines as a single
> empty line. Setting to "\n\n" will blindly assume that the next input
> character belongs to the next paragraph, even if it's a newline. (Mnemonic:
> / delimits line boundaries when quoting poetry.)
>
> Quoting _poetry_?
Why not. It's true after all, and hence a reasonable mnemonic.
>
> The choice of "" as a special is clearly a choice of convenience on the part
> the people doing the internals-- and has no particular mnemonic or symbolic
> values. I'm glad that's clear.
"" and undef are the only two values that could be used as something special,
since everything else is a possible literal end of line marker.
undef as "slurp" mode makes sense, since that's more common than paragraph
mode (in my experience anyway) and being undef means a simple 'local $/;'
is enough to enable it.
That leaves "" for something else, and paragraph mode is a good choice in
my opinion, since it's a reasonably commonly wanted operation.
Of course when references arrived a new possibility became available and
(since it's perl) was used...
-- Sam Holden
- Next message: Abigail: "Re: Opinions on "new SomeObject" vs. "SomeObject->new()""
- Previous message: James Willmore: "Re: Problem With DBI - fetchrow_array"
- In reply to: Henry: "Re: Teach me how to fish, regexp"
- Next in thread: Henry: "Re: Teach me how to fish, regexp"
- Reply: Henry: "Re: Teach me how to fish, regexp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|