in reply to copy files from one directory to another

Just a few comments that may or may not be helpful..
$file[$i]=do{local(@ARGV,$/)=$files[$i];<>};
What is this? Why do you localize @ARGV? Do you want to slurp the file? If so why?

mkdir("$name",0777)||print $!;
This creates a directory in the current working directory. Is that where you want it to be created?
$oldlocation="/home/newbie/ta/$file[$i]";
Are you sure you want $file[$i] (not sure what that contains) and not $files[$i] (the current filename).

Replies are listed 'Best First'.
Re^2: copy files from one directory to another
by luckysing (Novice) on Aug 03, 2010 at 21:20 UTC
    All of these are really great questions.I can see your depth of Perl knowledge. Yes i need to slurp the file I need to get some values from the files without going to the extent of getting data line by line and saving memory.Also I want the directory to be created in the present directory I am working in.I just needed to extract the current file which is $files$i that is the name of the file to extract them and run Perl scripts on the data.