Here's an implementation of the suggestion I made in my reply to Corion...
Short and sweet. :-)#!/usr/bin/perl -w use strict; use Tie::File; use List::Util qw( shuffle ); tie my @file, 'Tie::File', $ARGV[0] or die "$ARGV[0]: $!"; print $file[$_], "\n" for shuffle 0 .. $#file;
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Randomize lines with limited memory
by sauoq
in thread Randomize lines with limited memory
by natch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |