|
Posted by A. Sinan Unur on February 28, 2008, 9:57 pm
Please log in for more thread options
> Tad J McClellan wrote:
>>
>>> $xml =~ s/’/'/sg;
>>
>>
>> The s///s modifier makes dot in your pattern match a newline.
>>
>> It is a no-op when your pattern does not have a dot in it.
>
> I have seen it many times but my book say some bit different.
>
> <cite>
> Larry Wall, Tom Christiansen & Randal L. Schwartz
> Programming in Perl (Czech translation, 1997)
>
> Chapter 2: Basic program parts, page 74
>
> Modifiers:
> ....
> s Work with string as with single line.
> </cite>
In the mean time, here in 2008, in the docs shipped with Perl 5.10
perldoc perlop
s Treat string as single line. (Make . match a newline)
Sinan
--
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.rehabitation.com/clpmisc.shtml>
|