Sorry, you're right, it was the absence of the depth parameter that was treated as infinite depth. I did notice that $findfile($mircdir,*.mrc,0,%null_variable) returns nothing at all, and isn't the same as $findfile($mircdir,*.mrc,0). I wonder if it's supposed to be that way, though you can always sanitize the variable by changing $null into 0 or 999999.