develooper Front page | perl.perl5.porters | Postings from January 2005

[perl #33942] perlre: /ms: add $/ hint

Thread Next
From:
Dan Jacobson
Date:
January 26, 2005 11:52
Subject:
[perl #33942] perlre: /ms: add $/ hint
Message ID:
rt-3.0.11-33942-106496.19.9244440420723@perl.org
# New Ticket Created by  Dan Jacobson 
# Please include the string:  [perl #33942]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=33942 >


Perlre says
       m   Treat string as multiple lines.  That is, change "^" and "$" from...
       s   Treat string as single line.  That is, change "." to match any...
But without also hinting that $/ needs to be changed, the user will get nowhere.

P.S., please add something like this most basic example:
$ seq 4|perl -pwe 'BEGIN{undef $/}s/2\n3/X/'
1
X
4
to perldoc -q 'matching over more than one line' (perlfaq6.pod), as
for some reason there are no examples with "\n" in the regexp. Or
mention there why not.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About