<html>
At 02:12 PM 09/22/99 -0600, Blair Murri
wrote:<font face="Arial, Helvetica" size=2 color="#0000FF"><blockquote type=cite cite>
<ul>
There is a problem with the perl script that you wrote. The
attrib.xml version contains the words from the dicionary, but the
child.xml doesn't (unless my mail server dropped a line).<br>
<br>
I don't have time to re-run your test yet, but it would be interesting to
see what happens when the test is fair.</font> </blockquote>
</ul>Doh! "Code in haste, debug in leisure." Ok,
here are the corrected results:<br>
<br>
$ ./make.pl<br>
$ ls -l<br>
total 14206<br>
-rw-rw-r-- 1 mnutter mnutter 5811846 Sep 23
08:28 attrib.xml<br>
-rw-rw-r-- 1 mnutter mnutter 8672170 Sep 23
08:28 child.xml<br>
-rwxr-xr-x 1 mnutter
mnutter 999 Sep 23 08:26
make.pl<br>
-rwxr-xr-x 1 mnutter
mnutter 976 Sep 22 13:16
make.pl~<br>
$ gzip attrib.xml<br>
$ gzip child.xml<br>
$ ls -l<br>
total 1332<br>
-rw-rw-r-- 1 mnutter mnutter 670757
Sep 23 08:28 attrib.xml.gz<br>
-rw-rw-r-- 1 mnutter mnutter 681080
Sep 23 08:28 child.xml.gz<br>
-rwxr-xr-x 1 mnutter
mnutter 999 Sep 23 08:26
make.pl<br>
-rwxr-xr-x 1 mnutter
mnutter 976 Sep 22 13:16
make.pl~<br>
<br>
So child.xml.gz is slightly larger than attrib.xml.gz (about 1.5%,
assuming my math isn't as bad as my coding).<br>
<br>
Here again, for reference, is my (corrected) perl script.<br>
<br>
#!/usr/bin/perl<br>
<br>
open WORDS, "</usr/dict/words" or die "Couldn't open
dictionary.\n";<br>
open ATTRIB, ">attrib.xml" or die "Couldn't open
attrib.xml\n";<br>
open CHILD, ">child.xml" or die "Couldn't open
child.xml\n";<br>
<br>
@twenty_strings = qw(one two three four five six seven eight nine
ten<br>
eleven twelve thirteen fourteen fifteen sixteen<br>
seventeen eighteen nineteen twenty);<br>
<br>
print ATTRIB "<attrib>\n";<br>
print CHILD "<child>\n";<br>
<br>
while($word = <WORDS>)<br>
{<br>
$time = time();<br>
$timestr = localtime($time);<br>
$twenty = rand % 20;<br>
$twentystr = $twenty_strings[$twenty];<br>
print ATTRIB <<EOM;<br>
<word time="$time" timestr="$timestr"
twenty="$twenty"<br>
twentystr="$twentystr">$word</word><br>
EOM<br>
print CHILD <<EOM;<br>
<word><br>
<time>$time</time><br>
<timestr>$timestr</timestr><br>
<twenty>$twenty</twenty><br>
<twentystr>$twentystr</twentystr><br>
<data>$word</data><br>
</word><br>
EOM<br>
}<br>
<br>
print ATTRIB "</attrib>\n";<br>
print CHILD "</child>\n";<br>
<br>
close CHILD;<br>
close ATTRIB;<br>
close WORDS;<br>
<br>
<br>
<div>-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-</div>
<br>
<div>Mark Nutter, <mnutter@fore.com></div>
<div>Internet Applications Developer</div>
<div>FORE Systems</div>
<div>Some people are atheists 'til the day they die.</div>
</html>