well this code works for me
sub Esoda_Statistika_button {
my @totalExoda = ();
my $sum = 0;
my $clearedValue=0;
chdir "/home/props/delice/eksoda" or die "didn't make to eksoda folde
+r\n";
foreach my $file (glob '*.txt') {
open IN, $file;
while (<IN>) {
if ($_ =~ m/(Exoda.*Total:)(.*\d)/) {
$clearedValue =$2;
push(@totalExoda,$clearedValue);
} #if
} #end while
} #end outer foreach
foreach (@totalExoda){
$sum+= $_;
} #end inner foreach
chomp $sum;
print "$sum\n";
} #end sub
this thing stresses my head :)