Re: Dir Command to an array



I tried to initialize the variable using the back-ticks methods on my
XP system. But I get errors:

use strict;
my @allfiles = `dir`;
print $allfiles[0];
print "\n";

yields:

"C:\perldata>windir.pl
Use of uninitialized value in string at C:\perldata\windir.pl line 3."

Also - are back-ticks considered bush-league because they present some
kind of security risk?

.