Noah wrote:
Hi there,
Hello,
why is the perl glob command returning a number and not the filenames?
my (@filenames, @files);
You are creating a new variable named @files which will be empty.
for my $file (@files) {
Because @files is empty this loop will not execute and *nothing* will
On Fri, Jun 25, 2010 at 02:56:34PM -0700, Noah wrote:
> Hi there,
>
> why is the perl glob command returning a number and not the filenames?
It's not, it's just the way you are printing it. Try changing that dot to a
comma, or C< print "@files\n"; >
You need to understand context in order to le
Hi there,
why is the perl glob command returning a number and not the filenames?
my (@filenames, @files);
for my $file (@files) {
#my $filename = "$directory/*$file";
#print "$filename\n";
@files = <$directory/*$file> or die $!;
print @files . "\n";
push @filenames, @f