Hi all !
Can anybody tell me why the following code is not copying the file from source to destination?
Thakns in advance........
use File::Copy;
my $source="C:\\shared\\8.4.1\\DXSI";
my $dest="C:\\r45";
my @files;
my $file;
opendir(DIR, $source) or die "can't opendir $source: $! \n";
@files=readdir(DIR);
close DIR;
foreach $file(@files)
{
print "\n $file";
if($file ne "." || $file ne "..")
{
if (-f "$source$file")
{
chomp($file);
print "\n copying....";
copy($source, $dest) or die "Copy Failed: ";
}
}
}