http://www.perlmonks.org?node_id=442042


in reply to "-e" and "-d" switches

-d => If it is a directory
-e => If it exists