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

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

Hi , I want to create a file inside a directory , the directory is to be dynamically created based on a variable. Suppose, if the file is to be C:\Users\temp\file.pl I am creating the file.pl and directory temp does not exist. Is there any way to create the temp directory while creating file.pl itself or I have to creat directory first and then create file ?