What is the best way in Perl to copy files to a yet to be created destination directory tree?
Something like
copy("test.txt","tardir/dest1/dest2/text.txt");
wont work since the directory tardir/dest1/dest2 does not yet exist.
What is the best way to copy with directory creation in Perl?