in reply to working with directories

You want to use File::Path's mkpath() function.

japhy -- Perl and Regex Hacker