in reply to selecting N random lines from a file in one pass
Off-topic, but I can't resist. Every time I see a C-style for loop in someone's Perl code, I die a little inside. How about this instead:
for my $i ( 0 .. $#sample ) { print "[$i] '$sample[$i]'\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: selecting N random lines from a file in one pass
by seuratt (Novice) on Dec 22, 2004 at 17:49 UTC | |
by perrin (Chancellor) on Dec 22, 2004 at 18:38 UTC | |
|
Re^2: selecting N random lines from a file in one pass
by Anonymous Monk on Dec 23, 2004 at 15:10 UTC |