in reply to Re^2: speed up split?
in thread speed up split?

Your use of tr is correct. It's a little easier to read if you just say
tr/\r\n/ /s;
I am replacing runs of \n and/or \r with single spaces.

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^4: speed up split?
by dragonchild (Archbishop) on Mar 22, 2005 at 18:20 UTC
    It's not only easier to read, but it's also more portable. There's nothing to say that \n will be ASCII 10 and \r will be ASCII 13. In fact, on old Macs, \n is ASCII 13 ... :-)

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.