in reply to File::Util list_dir question

Some code would have been helpful, but without it my answer is: use eval around the code.