sub Unknown_Number { my $device = shift; my $max_nb = Octopussy::Parameter('wizard_max_msgs'); my ($total, $nb) = (0, 0); my $dir = Octopussy::Storage::Directory_Unknown($device); Octopussy::FS::Create_Directory("$dir/$device/Unknown/"); foreach my $fy (glob "$dir/$device/Unknown/*") { foreach my $fm (glob "$fy/*") { foreach my $fd (glob "$fm/*") { foreach my $f (glob "$fd/*") { chomp $f; $nb = `zcat "$f" | wc -l`; chomp $nb; $total += $nb if ($nb >= 0); return ($total) if ($total > $max_nb); } } } } return ($total); }