Im a complete neebee so my apologies for this:
How can I put variables in commands that I give to the OS?
my @filelist =`dir /OD $dir`; #( /OD option puts them in order.)
I use the above from this script below but get the error: dir: cannot access /OD: No such file or directory
Any ideas?
#!C:\strawberry-perl\perl\bin\perl.exe
use strict;
use File::Copy;
use File:
ath;
my $dir ='C:\test';
my @filelist =`dir /OD $dir`;
print $filelist[5];
How can I put variables in commands that I give to the OS?
my @filelist =`dir /OD $dir`; #( /OD option puts them in order.)
I use the above from this script below but get the error: dir: cannot access /OD: No such file or directory
Any ideas?
#!C:\strawberry-perl\perl\bin\perl.exe
use strict;
use File::Copy;
use File:
my $dir ='C:\test';
my @filelist =`dir /OD $dir`;
print $filelist[5];