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

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

Thread Next
Dan Jacobson
January 26, 2005 11:52
[perl #33942] perlre: /ms: add $/ hint
Message ID:
# New Ticket Created by  Dan Jacobson 
# Please include the string:  [perl #33942]
# in the subject line of all future correspondence about this issue. 
# <URL: >

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/'
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About