in reply to Counting in loop help!
Im not sure I fully understand your question, but I will try to answer it. I'm not sure why your using a list down in check_names to get your argument. but anyway I would just use counter, if you want to incorporate it into the for loop perhaps or you can put it outside..
my $how_many_names_total = 0; foreach my $name(@names){ if($name){ $how_many_names_total++; check_names($name); } else{ next; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Counting in loop help!
by Anonymous Monk on Jul 26, 2012 at 20:01 UTC | |
by Rudolf (Pilgrim) on Jul 26, 2012 at 20:26 UTC |