Try a modification of the below with File::Find (I think it will do UNC paths ... anyone?) or DosGlob. You could foreach ( @ARGV ) to parse through specific shares. Win32::NetResource has a discovery capability (not for hidden shares, though).
#!/usr/bin/perl -w
use strict;
use Win32::Perms;
use vars qw ( @List @Mask );
my $Dir = new Win32::Perms( $ARGV[0] );
$Dir->Dump( \@List );
foreach my $shareRef ( @List ) {
print "\n" , $shareRef->{'Domain'} , '/' , $shareRef->{'Account'}
+, "\n\n";
Win32::Perms::DecodeMask ( $shareRef, \@Mask );
foreach ( @Mask ) {
print "\t" , $_ , "\n";
}
}
BTW, the URL to Win32::Perms is:
http://www.roth.net/perl/perms/
Dave's main page does seem like a wonderful rendition of a cow in a snowstorm.