in reply to mkdir usage

  1. if (! -d abc) { should be if (! -d 'abc') {

    use warnings; would have caught that:

    C:\test>perl -wE"if( -d abc ) { say 'hi' }" Unquoted string "abc" may clash with future reserved word at -e line 1 +. Name "main::abc" used only once: possible typo at -e line 1. -d on unopened filehandle abc at -e line 1.
  2. You cannot create a directory if a file of the same name already exists.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong