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

Eagle_f91 has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to get a script to check to see if a folder exists and if it does not create it. Now I am sure this is basic for you guys but to me it is all new and hard. The code I am using is this:
if (!-d "e:/web/public_html/eagle_f91/ffinfo/protected/images/$Game") +{ mkdir("e:/web/public_html/eagle_f91/ffinfo/protected/images/$Game" +); } if (!-d "e:/web/public_html/eagle_f91/ffinfo/protected/images/$Game/$S +ubSet") { mkdir("e:/web/public_html/eagle_f91/ffinfo/protected/images/$Game/ +$SubSet"); } if (!-d "e:/web/public_html/eagle_f91/ffinfo/protected/images/$Game/$S +ubSet/thmb") { mkdir("e:/web/public_html/eagle_f91/ffinfo/protected/images/$Game/ +$SubSet/thmb"); }
The code looks fine to me but maybe someone else can see what I am doing wrong.