http://qs321.pair.com?node_id=1186609

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

$dir= "VEHICLES"; mkdir ($dir); chdir ($dir); foreach $file(@files) { mkdir $file; chdir $file; chdir $dir; }
I am not able to create two sub-directory only one sub-directory is creating inside vehicles

EXAMPLE: VEHICLES->CARS. Bike is not creating inside VEHICLES

I tried alot but couldnt able to do that please help me to do that