Re: s///x



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";'
.



Relevant Pages

  • Re: s///x
    ... I mentioned it because people ** misunderstand the meaning of it all the time, ... It's like complaining someone uses 'use warnings' on a piece of code where it didn't matter. ... (Not saying that Dr. Ruud doesn't know the implications of using the /s modifier. ...
    (comp.lang.perl.misc)
  • Re: s///x
    ... so maybe you meant "redundant here"? ... misunderstand the meaning of it all the time, and I believe one reason ... the only place in the docs where its meaning is properly explained. ...
    (comp.lang.perl.misc)
  • Re: Chez Watt Re: Common ancestor between man and ape
    ... posted by Bob Casanova: ... whose meaning changed via this exact process. ... An office and house could ... although I don't mind it so it doesn't matter. ...
    (talk.origins)
  • Some boring trainees maintain Charlie, and they too arrange Chuck too.
    ... crawling prior to the stuck schedule. ... who's highlighting no matter how the user's riot. ... issuing prior to a meaning over the election is too growing for ... fast pray underneath lexical mysterious shores. ...
    (sci.crypt)
  • Re: Chez Watt Re: Common ancestor between man and ape
    ... posted by Bob Casanova: ... whose meaning changed via this exact process. ... An office and house could ... It doesn't matter if that is right or ...
    (talk.origins)