Re: s///x
- From: Abigail <abigail@xxxxxxxxxx>
- Date: 02 Nov 2005 21:45:33 GMT
Gunnar Hjalmarsson (noreply@xxxxxxxxx) wrote on MMMMCDXLVI September
MCMXCIII in <URL:news:3ss54cFpe3koU1@xxxxxxxxxxxxxx>:
** Dr.Ruud wrote:
** > Gunnar Hjalmarsson schreef:
** >>Note that the /s modifier is redundant (see "perldoc perlre").
** >
** > I don't consider the /s modifier redundant. It was not needed in my
** > example, so maybe you meant "redundant here"?
**
** Okay, redundant (or extraneous...) here. I mentioned it because people
** misunderstand the meaning of it all the time, and I believe one reason
** for that is that "perldoc perlre" - unlike e.g. "perldoc perlop" - is
** the only place in the docs (to my knowledge) where its meaning is
** properly explained.
Damian makes a good argument in PBP to always use /s and /m.
I don't think it's worth raising your finger if someone uses /s or /m
on a regex where it doesn't matter. It's like complaining someone uses
'use warnings' on a piece of code where it didn't matter.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
.
- Follow-Ups:
- Re: s///x
- From: Anno Siegel
- m//ms (was Re: s///x)
- From: Tad McClellan
- Re: s///x
- From: Gunnar Hjalmarsson
- Re: s///x
- References:
- Prev by Date: Re: More Forks!
- Next by Date: Re: IIS 5.1 + Perl
- Previous by thread: s/// and modifiers m and s (was: Re: s///x)
- Next by thread: Re: s///x
- Index(es):
Relevant Pages
|