summaryrefslogtreecommitdiff
path: root/Tools/schnitt/unsort
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/schnitt/unsort')
-rwxr-xr-xTools/schnitt/unsort25
1 files changed, 25 insertions, 0 deletions
diff --git a/Tools/schnitt/unsort b/Tools/schnitt/unsort
new file mode 100755
index 0000000..83adfb6
--- /dev/null
+++ b/Tools/schnitt/unsort
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+while (<>)
+{
+ $h{$_}=1;
+}
+
+foreach $key (sort shuffle keys %h)
+{
+ print $key;
+}
+
+sub shuffle {
+ $ran = rand(1);
+
+ if ($ran > 0.5)
+ {
+ return -1;
+ }
+ else
+ {
+ return 1;
+ }
+}
+