Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

regexp for scalar containing a mixture of LF & CRLF

by NateTut (Deacon)
on Dec 09, 2004 at 22:52 UTC ( #413710=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
      open (TEXTFILE, ">$subdir/message.txt")
         or die "Can't create $subdir message file: $!";
      $doc->{Body} =~ s/\015/\n/gm;
      print TEXTFILE $doc->{Body};
      close TEXTFILE;
  2. or download this
      open (TEXTFILE, ">$subdir/message.txt")
         or die "Can't create $subdir message file: $!";
      $NewBody =~ s/\x0D\n/\n/g;
      print TEXTFILE $NewBody;
      close TEXTFILE;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://413710]
Approved by BrowserUk
[stevieb]: Torturing one of my dev RPis to turn four 5v stepper motors at the same time (via Parallel:: ForkManager for 50k degrees (a whole lot of full turns!). Let's see if it burns out or not.

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2018-03-22 22:10 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (286 votes). Check out past polls.