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.
In reply to Re:x2 scramble text simply (don't feed sort weird codeblocks)
by grinder
in thread scramble text simply
by bugsbunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |