in reply to Counter && print issue
Everything works fine now..but I have an other question : The foreach loop executes that system($command . $i); command until it reaches the end of $elt and this thing takes a few minutes.. is there a way to execute that command in a second for every $elt? Thxuse warnings; my $count = 0; foreach $i ($elt) { $execute = system($command . $i); if ( $execute > 0 ) { $counter++; chomp($i); printf "%s\n%-45s%s%s%4s%s",color('white +'),$elt, color('reset'),color('red'),'[DEAD]',color('reset'); } elsif ( $execute == 1 >> 8) { chomp($i); printf "%s\n%-45s%s%s%4s%s",color('whit +e'),$elt, color('reset'),color('green'),'[ Ok ]',color('reset'); $count++; } } } } print "$count";
|
|---|