#!/usr/bin/perl -w ## ## randomiseLines.pl ## Take a file on standard input, randomise order of lines and ## print to standard output ## ## Sean Kelly <mail@shortestpath.org> ## ## v0.1 1/June/2001 use strict; my %lines; while (<>) { $lines{ rand() } = $_; } my $line; foreach $line (sort keys %lines) { print $lines{$line}; }
In reply to randomiseLines by fx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |