I'm a newbie with Perl. I'm trying to make a system call to move some files to another directory, but the directory is based on a variable that I've created.
Here is a snippet of my code:
[code=perl]
my $newsubdir = $dir . $filedate;
mkdir($newsubdi r,0777) || die "cannot mkdir";
system("move C:\\test\\files \\*.log C:\\test\\files \\$newsubdir\\" );
[/code]
The $newsubdir doesn't seem to work inside the system call.. Can someone tell me what I'm doing wrong? Thanks in advance! :)
Here is a snippet of my code:
[code=perl]
my $newsubdir = $dir . $filedate;
mkdir($newsubdi r,0777) || die "cannot mkdir";
system("move C:\\test\\files \\*.log C:\\test\\files \\$newsubdir\\" );
[/code]
The $newsubdir doesn't seem to work inside the system call.. Can someone tell me what I'm doing wrong? Thanks in advance! :)
Comment