1) ($Total)=( (qx{dir /s "$UncSharePath"})[-2]=~ /([\d,]+) bytes/ ) 2) find(sub { $total += -s }, $dir);