[EMAIL PROTECTED] wrote:
UINX is fine, what about win2k?

Just write a one line Perl script.


> how could I convert "new line" to "line feed"(0x0A) or "carriage
> return"(0x0D,0x0A)?

newline is automatically converted to \r\n on Windoze when you
print the data, so that's no problem.  If you want to drop the \r
and output data that can be read by UNIX, just binmode the output
FH so the \r isn't added.

If the data already has \r's in memory somehow, you could use tr
to remove them:
        $line =~ tr/\r//d;   or tr/\015//d

If you run on UNIX, no \r will be added and the binmode is ignored.
To add a \r on each line - try something like:
        s/([^\r])\n/$1\r\n/gs;

--
  ,-/-  __      _  _         $Bill Luebkert   ICQ=162126130
 (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/


_______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to