[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] This far...



I've gotten this far, and the file does an iterated walk, finds and adds up
the file sizes. The problem, probably a stupid one, is that it's not
iterating. What am I doing wrong?

$dir = "Strider:Downloads";
chdir $dir || die "Can't chdir $dir : $!";
&readDir( $dir );

sub readDir (){
	local($path) = $_;
	opendir( DIR, $path ) || die "Can't open $path : $!";
	@fileList = readdir( DIR );
	closedir( DIR );

	while ($i++ <= $#fileList) {
		$fil = "$path:$fileList[$i]";
		print "$fil $info[2]\n";
		@info = stat($fil);
		if ($info[2] =~ /16/) { &readDir( $fil );}
		elsif ($info[2] =~ /33/) {$total += $info[7];}
		elsif ($info[2] =~ /33/) {$total += $info[7];}
	}
}
print "$total\n";

-Seraph
PS- thanks to all who helped me get this far =)



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch