Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Ria: Substitution

by baku (Scribe)
on Jun 01, 2001 at 09:36 UTC ( #84858=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Substitution
in thread replacing one or more newlines with commas

Generally, (at least in theory, under Perl 5.6, &c.) "\n" means "whatever makes a new line," and not necessarily "an ASCII LF character." "\n" could very well translate to \012 (Unix -- ASCII's "linefeed" char), \015 (MacOS < 10 -- ASCII's "carriage return" char), or \015\012 (MS-DOS/Windows -- CRLF)...

Of course, this relies on a lot of magic, like binmode disciplines, all working as they should, so it's quite possible that some "\r\n" sequences could slip in despite it all... :-) The joys of relying on the cutting edge.


#!/Applications/Utilities/perl -T use strict; use warnings; use utf8; no bytes; require v5.6.5;


Comment on Ria: Substitution
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://84858]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (16)
As of 2015-07-28 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls