Anthony Ettinger wrote:
> On 6/19/06, John W. Krahn <[EMAIL PROTECTED]> wrote:
>> Anthony Ettinger wrote:
>> >>    # order matters
>> >>    $raw_text =~ s/\015\012/\n/g;
>> >>    $raw_text =~ s/\012/\n/g unless "\n" eq "\012";
>> >>    $raw_text =~ s/\015/\n/g unless "\n" eq "\015";
>> >
>> > Does it make any difference if I use s/\cM\cJ/cJ/ vs. s/\015\012/\n/g ?
>>
>> The string "cJ" in your example is completely different than the
>> string "\n"
>> and even if you had used "\cJ" it would still not be the same some of
>> the time
>> and you don't have the /g option on your example.
> 
> Not according to the perlport page, it reads as though they are
> synonymous with each other. Also, why would a newline not be at the
> end of a line? I don't see that /g *has* to be there except for the
> mac files, which is what I have.

I don't have the original post for context but a lot depends on what the input
record separator contains and what layer PerIO is using and what operating
system the program is running on.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to