[SNIP]
John> #/usr/local/bin -w
John> ^^
John>I see no 'perl' there.
Typo.
[SNIP]
John> my (@ARRAY, %TEST, $FILTER) = "";
John>
John> Why are you assigning "" to the first element of @ARRAY?
'Cause I'm an idiot...
[SNIP]
John> Perl has the tools to do most of that without runnin
Hi All,
I want to read contents of a dir, filtered, into a hash. I have this:
#/usr/local/bin -w
use strict;
my (@ARRAY, %TEST, $FILTER) = "";
print "Enter filter:";
$FILTER = ;
chomp $FILTER;
@ARRAY = ` ls -l /foo/bar | grep "$FILTER" `;
for (@ARRAY) {
chomp;
}
This gets just the info I want,