Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: create directories while creating a file

by ww (Bishop)
on Jan 02, 2013 at 13:00 UTC ( #1011265=note: print w/ replies, xml ) Need Help??


in reply to create directories while creating a file

I think you'll find that you MUST first create the dir and then the file; it's an OS issue. In one manner or another, the dir holds pointers to its files.

OTOH, as toolic suggested, you could create a dir and THEN create/store the file there and do both WITHIN a rather simple script. See perldoc -f mkdir for a function rather than a module.

You're on your own re the file creation though; you've provided insufficient info.


Comment on Re: create directories while creating a file
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011265]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2015-07-03 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls