#!/usr/bin/perl
use Cwd;
open(PACK,"find * -name \"*.tgz\" -o -prune -name \".??*\" -type f |");
while(<PACK>) {
    chop;
    (@path) = split(/\//,$_);
    $file = pop(@path);
    $dir = join '/', (@path);
    system "md5sum $dir/$file";
}
close(PACK);
