SparkeyG has asked for the wisdom of the Perl Monks concerning the following question:
I have a feeling I can tighten this up with map but after doing some reading, I am still a little fuzzy as to how to accomplish this. I humbly ask for help.
--SparkeyGopendir(DIR, $directory) or die $!; @files = grep { /^\w{3}\d*:log.$date$/ } readdir(DIR); foreach my $line (@files) { $line =~ m/^(\w{3}\d*):log.$date$/; $fileHash{$1} = $line; } closedir DIR;
Back to
Seekers of Perl Wisdom