shamala has asked for the wisdom of the Perl Monks concerning the following question:
if $flag then $refsize=`getsize()` #getsize is a subprogram that gets the size of the file $newsize=$refsize; sub prog[ this is group $v=1; loop ($repeat times) <loop begin>$size=getsize(); if $size==$newsize; $sizeT+=$size; #cumulative addition $samefile++; else $newsize= $size;$flag=0 ; continue with the loop; <loop end> $samefile with $size -- display. delete all the files bearing this size(using reverse hash and del +ete with key as the size). $no of $samefile = $num; $repeat=128-$num; call sub prog if $rep!=0; else $rep=128 and $v++; # go to the next group of 128 files
for example
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting started -- hashes!
by davido (Cardinal) on May 15, 2004 at 09:13 UTC | |
|
Use your language built-in features
by TomDLux (Vicar) on May 15, 2004 at 21:32 UTC |