Nansh has asked for the wisdom of the Perl Monks concerning the following question:
I want directory structure like this
VEHICLES->CARS
BIKES->
VEHICLES is a main directory CARS is a sub-directory and BIKES is also sub-directory of VEHICLES
we have CARS and BIKES in an array called @files
I am not able to create two sub-directory only one sub-directory is creating inside vehicles$dir= "VEHICLES"; mkdir ($dir); chdir ($dir); foreach $file(@files) { mkdir $file; chdir $file; chdir $dir; }
EXAMPLE: VEHICLES->CARS. Bike is not creating inside VEHICLES
I tried alot but couldnt able to do that please help me to do that
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Directory Structure.
by GotToBTru (Prior) on Mar 31, 2017 at 12:53 UTC | |
Re: Directory Structure.
by AppleFritter (Vicar) on Mar 31, 2017 at 12:03 UTC | |
Re: Directory Structure.
by shmem (Chancellor) on Mar 31, 2017 at 13:19 UTC | |
Re: Directory Structure.
by hippo (Bishop) on Mar 31, 2017 at 12:59 UTC | |
Re: Directory Structure.
by madtoperl (Friar) on Mar 31, 2017 at 13:05 UTC | |
Re: Directory Structure.
by pryrt (Abbot) on Mar 31, 2017 at 15:01 UTC | |
Re: Directory Structure.
by oldtechaa (Beadle) on Mar 31, 2017 at 12:10 UTC | |
Re: Directory Structure.
by duyet (Friar) on Apr 01, 2017 at 09:39 UTC | |
by AppleFritter (Vicar) on Apr 01, 2017 at 09:59 UTC | |
by shmem (Chancellor) on Apr 01, 2017 at 10:13 UTC | |
by AppleFritter (Vicar) on Apr 01, 2017 at 10:22 UTC | |
by shmem (Chancellor) on Apr 01, 2017 at 10:43 UTC |
Back to
Seekers of Perl Wisdom