|more useful options|
how to get all keys of inner hashesby ovedpo15 (Monk)
|on Jan 10, 2019 at 09:32 UTC||Need Help??|
ovedpo15 has asked for the wisdom of the Perl Monks concerning the following question:
I have a function which looks as follows:
I had a hash that has files as keys and timestamps as values. But now I have changed the hash a little.
The keys of the new hash are directories and the values are the previous hash (meaning keys = files values = time).
I were passing the hash keys as array to the convertToFile function:
But now it won't work because I need the nested hashes.
I don't care about the order of the hashes I just care about the files.
I want to pass file to a the function and it does not matter from which directory.
I was wondering if its possible to do without any additional loops or code, maybe some special keywords.
Another related small question:
I were using the following syntax to combine two hashes into one:
What if I have two keys (which are directories) that are the same? will it combine the inner hashes?
How the new hash will look like?