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

[MacPerl-AnyPerl] [MacPerl] Problem solved



Hello Listers,

A week or two ago, I emailed the group asking for help. I needed to 
search through an AppleShare volume and collect some information. Here is 
the program I came up with. Please comment this solution (which borrowed 
heavily from the Perl Cookbook and MacPerl Power and Ease).

----------

#!/usr/local/bin/perl

use File::Find;

$vol = "Projects:";

print "File Suvery on volume - $vol\n\n";

find (\&search_vol, $vol);

sub search_vol {
	$cnt++;
	$filetype{MacPerl::GetFileInfo($_)}++;
}

print "\nFinal Count - $cnt\n";

foreach $i (sort keys %filetype) {
	print "$i - \t $filetype{$i}\n";
}

print "\nDone with totals!\n";

----------

Elton



========================================================================= 
NOVA Private Industry Council                 505 W. Olive Ave. Suite 550 
Elton Hughes (Information Technology)                  Sunnyvale CA 94086 
Phone: 408-730-7235                                     Fax: 408-730-7643 
------------------------------------------------------------------------- 



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org