for ( glob '/usr/home/*/logs' ) { # open the dir - handle errors # do stuff... }