|Just another Perl shrine|
Order of linksby ovedpo15 (Pilgrim)
|on Apr 29, 2021 at 10:20 UTC||Need Help??|
ovedpo15 has asked for the wisdom of the Perl Monks concerning the following question:
I have a hash of links %links. The key is the source of the link and the value is the target of the link.
I'm trying to create a script which creates those links (by using ls -s [target] [source]).
At first I thought that it does not really matter the order of creating the links. So I did:
The problem is with a link that dependent on another link. So for example if I have those links:
So in that case, since we create /usr only after trying to create /usr/pkgs/python/2.7.5 it will fail.
Is it possible to suggest a strategy on how to find the right order of the links?