in reply to comparing array elements

One simple way: use a hash instead.
my %running = ( foo => 1, bar => 1, baz => 1 ); if ($running{'foo'} == 1) { # do stuff } # foo has finished: delete $running('foo'}

HTH!

andye