ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
Re: [perl #34287] perlfaq6: /m matching beyond the first newline
by Yitzchak Scott-Thoennes other posts by this author
Feb 28 2005 5:10PM messages near this date
[perl #34287] perlfaq6: /m matching beyond the first newline | Re: [perl #34287] perlfaq6: /m matching beyond the first newline
On Mon, Feb 28, 2005 at 08:12:20PM -0000, Dan Jacobson wrote:
>  perlfaq6.pod: "/m" allows caret and dollar to match next to a newline,
>          not just at the end of the string.
>  
>  Add: "You'll still need /mg if you want to match beyond the first
>  newline."!

But that's not true.  Consider:

$ perl -we'"abc\ndef\nghi\n" =~ /^ghi/m; print $&'
ghi

I think /m and its effect on ^ and $ are well enough described in
perlre (which the preceeding sentence directs you to).  Can you
describe the code you were using that you found confusing?  That would
help in figuring out what improvements in the doc might have helped
you.
Thread:
Dan Jacobson
Yitzchak Scott-Thoennes
Ronald J Kimball

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved