![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: create directory with inputby CountZero (Bishop) |
on Dec 04, 2017 at 11:04 UTC ( #1204835=note: print w/replies, xml ) | Need Help?? |
File::Spec provides a convenient interface to constructing directory names and filenames and it works in many operating systems:
In the present case it would go like this: Output (in Windows): C:\Users\darkblack\Desktop\A\testdir But running under Unix it will return C:/Users/darkblack/Desktop/A/testdir File::Spec::Functions provides an even easier functional interface. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
In Section
Seekers of Perl Wisdom
|
|