I must be getting stupid on a Friday afternoon, but this is driving me
crazy. I coded this routine:
$dir = 'e:/my_projects/zip/files/';
while ($name = <$dir*>) { #
scan the directory
if ($name=~ /\.\d{6}/) { #
look for date extension 6 x #
($fn, $key) = split(/\./, $name); # get date
into $key
if ($list{$key}) {
# Is date already in hash?
push (@$list{key}, ($name)); } # Yes - add
the filename
else {
$list{$key} = [$name]; # No
- add it to the hash with the filename
}
}
}
and I get a compile message : Type of arg1 to push must be an array (not
hash slice) on line 6.
So I tried splitting the line to:
$ref = $list{key};
push (@$ref, ($name)); } #
Yes - add the filename
When I run with the debugger, $list{key} contains "ARRAY(0xcaa098)", but
after the assignment $ref is still equal to ""
TIA for any help.
Ed Ewen
(404) 575-3531
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]