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

These are the file test operators (which are different from the command line switches that look the same). They're documented in perlfunc.

In short, -d tests if its argument is a directory, and -e tests if its argument exists.

In your code, it looks like the if() ensures that there is a true value for those hash keys and that the file or directory does not already exist. The next part probably creates them.

--
brian d foy <bdfoy@cpan.org>