<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>1) Just a little hint, obvious though this 
may be to many.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>-i can be used without -p.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>perldoc perlrun gives info on using -pi, 
but not on -i by itself. </FONT><FONT face="Courier New" size=2>The usage is 
easy; just add the while and print yourself.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>To remove all filenames containing 
/Temporary Internet Files/ from a list of filenames I saved in 
~/allfiles:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>$ perl -i -e 'while(&lt;&gt;){print unless 
/Temporary Internet Files/}' ~/allfiles ; wc allfiles 
allfiles.bak<BR>&nbsp;283986&nbsp; 498823 17066061 allfiles<BR>&nbsp;382211 
1087456 28422428 allfiles.bak</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>So when I last generated that list (with 
find / &gt; ~/allfiles ), I had over half a million Temporary Internet Files. 
Phew.. maybe I read too much.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>2) </FONT><FONT face="Courier New" 
size=2>List::SkipList</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT><FONT face="Courier New" 
size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>If anyone wants to know a fast &amp; 
efficient sorting module, you might try List::SkipList. It's a way of creating a 
sorted list in memory. I can generate a million-element list in RAM in about a 
minute on my Athlon 2400 XP laptop, under ActiveState Perl, with List::SkipList 
0.70. That's about 15 times slower than GNU sort, which is still often the best 
way to sort large lists, and perhaps no more efficient than the sort built into 
Perl, but the ability to maintain a list in sorted order as you insert elements 
is sometimes desirable. (You might also do just as well with BerkeleyDB, 
however, since it's fast efficient C code, and since disk writes can be cached 
quite well for a small database...)</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>If you'd like to test for yourself, you can 
use the following program.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>I put a long comment in there at a place I 
had a problem on Cygwin Perl 5.8.2 64-bit ints, in case anyone else has the 
problem. Works fine on ActiveState 5.8.2, or Cygwin 5.8.4 32-bit ints I compiled 
recently.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>#!perl -w<BR>$|=1;<BR>use strict;<BR>use 
Time::HiRes qw(time);<BR>use List::SkipList;<BR>#$list-&gt;insert( 'key1', 
'value' );<BR>#$list-&gt;insert( 'key2', 'another value' );<BR>#$value = 
$list-&gt;find('key2');<BR>#$list-&gt;delete('key1');<BR>my $n = 
1000.0/64;<BR>#print "If the algorithm is of complexity O(n**1.5) then factor 
should be about 8 (4**1.5)\n";<BR>my $last = 0;<BR>my $factor = 0;<BR>my 
$list;<BR>my $svptr = 0;<BR>my @svarray;<BR>while ($n &lt;= 
1024001.0)<BR>{<BR>#&nbsp;&nbsp;&nbsp; print "deallocating list..";</FONT></DIV>
<DIV><FONT face="Courier New" size=2># The following line caused perl to 
silently bomb-out </FONT></DIV>
<DIV><FONT face="Courier New" size=2># for me&nbsp;without the push @svarray 
</FONT></DIV>
<DIV><FONT face="Courier New" size=2># in Cygwin Perl 5.8.2 64-bit using 
AutoLoader 5.60</FONT></DIV>
<DIV><FONT face="Courier New" size=2># after a list of 4061 elements or more has 
been created,</FONT></DIV>
<DIV><FONT face="Courier New" size=2># and is apparently being deallocated, 
whether running</FONT></DIV>
<DIV><FONT face="Courier New" size=2># List::SkipList 0.64, 0.65, or 
0.70.</FONT></DIV>
<DIV><FONT face="Courier New" size=2># It may be something wrong with my Perl 
installation.</FONT></DIV>
<DIV><FONT face="Courier New" size=2># A debugger trace showed the program ended 
after a line with this statement,</FONT></DIV>
<DIV><FONT face="Courier New" size=2>#&nbsp;in line 96 of an unknown module, 
which exists in line 96 of AutoLoader:</FONT></DIV>
<DIV><FONT face="Courier New" size=2># <FONT face="Times New Roman" size=3>*$sub 
= sub {}; </FONT></FONT></DIV>
<DIV><FONT face="Courier New" size=2>#&nbsp;But it works fine with&nbsp;Cygwin 
Perl&nbsp;5.8.4 (compiled myself, 32-bit ints)&nbsp;</FONT></DIV>
<DIV><FONT face="Courier New" size=2># or ActiveState 5.8.2,</FONT><FONT 
face="Courier New" size=2> with exactly the same AutoLoader, according to diff 
-b<BR>&nbsp;&nbsp;&nbsp; $list = 0; <BR>#&nbsp;&nbsp;&nbsp; print "creating 
list..";<BR>&nbsp;&nbsp;&nbsp; $list = new List::SkipList( max_level =&gt; 8 
);<BR>#&nbsp;&nbsp;&nbsp; push @svarray, $list; </FONT><FONT face="Courier New" 
size=2>#&nbsp;<BR>&nbsp;&nbsp;&nbsp; my @a = ();<BR>&nbsp;&nbsp;&nbsp; for 
(0..$n) {$a[$_] = sprintf("%d",rand()*1e11)};<BR>&nbsp;&nbsp;&nbsp; my $t0 = 
time;<BR>&nbsp;&nbsp;&nbsp; for (0..$n) 
{$list-&gt;insert($a[$_],1)};<BR>&nbsp;&nbsp;&nbsp; my $tend = 
time;<BR>&nbsp;&nbsp;&nbsp; my $elapsed = $tend - $t0;<BR>&nbsp;&nbsp;&nbsp; 
$factor = $elapsed / $last if $last;<BR>&nbsp;&nbsp;&nbsp; printf "n=%6d 
elapsed:%7.3f, factor=%5.2f\n", <BR>&nbsp;$n, $elapsed, 
$factor;<BR>&nbsp;&nbsp;&nbsp; $n *= 4.0;<BR>&nbsp;&nbsp;&nbsp; $last = 
$elapsed;<BR>};<BR>print "n=$n\n";<BR></DIV></FONT></BODY></HTML>