in reply to Recursive directories
File::Path->make_path is used to make a path, so you should define your $path before. If you try:
use File::Path 'make_path'; $path = '/'; File::Path->make_path($path); chdir $path or die "Cannot chdir: $!";
it will work and it does for me
To get the path you can do something like:
use File::Path 'make_path'; use Cwd; $path = Cwd::getcwd; File::Path->make_path($path); chdir $path or die "Cannon chdir: $!"; print $path. "\n":
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Recursive directories
by McA (Priest) on Apr 02, 2014 at 12:56 UTC | |
by cord-bin (Friar) on Apr 03, 2014 at 12:23 UTC |