in reply to Re: scramble
in thread scramble text simply
sort {rand > .5}
That's a bad way to scramble text, because it uses a bad method of performing a sort. The documentation makes the following point:
The comparison function is required to behave. If it returns inconsistent results (sometimes saying $x[1] is less than $x[2] and sometimes saying the opposite, for example) the results are not well-defined.
The usual definitions of not well-defined include dumps core and fails to terminate. It might work, but only by luck.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re:x2 scramble text simply (don't feed sort weird codeblocks)
by ChrisS (Monk) on Oct 06, 2003 at 14:15 UTC |