<?xml version="1.0" encoding="windows-1252"?>
<node id="303862" title="•Re: Randomize lines with limited memory" created="2003-11-01 19:28:40" updated="2005-06-15 02:52:36">
<type id="11">
note</type>
<author id="9073">
merlyn</author>
<data>
<field name="doctext">
I question the need to randomize the file and rewrite it in the first place.  Using something like [cpan://DBD::SQLite], you can store this stuff into a structured flat file, then write a series of random numbers into a second column, and then select items from your entries column based on a sort of the second column (or write a shuffled index list into the second column).
&lt;p&gt;
Anytime something sounds this hard, it's better to back up a step and say "what corner did I paint myself in to, and how did I get here?".  Always question the context.
&lt;div class="pmsig"&gt;&lt;div class="pmsig-9073"&gt;
&lt;p&gt;-- [http://www.stonehenge.com/merlyn/|Randal L. Schwartz, Perl hacker]
&lt;br&gt;
Be sure to read [id://205373|my standard disclaimer] if this is a reply.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
303841</field>
<field name="parent_node">
303841</field>
</data>
</node>
