pbelkin has asked for the wisdom of the Perl Monks concerning the following question:
my (%fileInfo) = find(\&wanted, @directories); sub wanted { if (!(-d)) { $fileName = $File::Find::name; $fileName =~ s/\//\\/g; $fileSize = ( -s $fileName); # printf "file 1 $fileName $fileSize\n"; if (!(exists $fileInfo{$fileName})){ $fileInfo{$fileName} = $fileName; printf "$fileInfo{$fileName}\n"; } } return %fileInfo; }
Edit g0n - code tags and formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: return hash table
by ikegami (Patriarch) on Oct 11, 2006 at 16:50 UTC | |
|
Re: return hash table
by derby (Abbot) on Oct 11, 2006 at 16:54 UTC | |
|
Re: return hash table
by brian_d_foy (Abbot) on Oct 11, 2006 at 18:48 UTC | |
|
Re: return hash table
by cdarke (Prior) on Oct 11, 2006 at 16:54 UTC | |
|
Re: return hash table
by runrig (Abbot) on Oct 11, 2006 at 18:53 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |