in reply to How do I tighten this with map?
opendir(DIR, $directory) or die $!; my @files = grep { /^\w{3}\d*:log.$date$/ } readdir(DIR); my %fileHash; %fileHash = map { /^(\w{3}\d*):log.$date$/; ($1 => $_) } @files; closedir DIR;
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: How do I tighten this with map?
by IraTarball (Monk) on Oct 16, 2001 at 20:08 UTC | |
by dragonchild (Archbishop) on Oct 16, 2001 at 21:26 UTC | |
by IraTarball (Monk) on Oct 16, 2001 at 21:47 UTC |