more useful options | |
PerlMonks |
Sorting by dependenciesby Anonymous Monk |
on Apr 27, 2013 at 18:39 UTC ( [id://1031000]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi I have a list of jobs which need to be executed according to some dependencies. for instance @jobs =qw(A B C D E) and should lead to a possible result: qw(C B E D A) How can I solve this in Perl? Unfortunately I cant assign a ranking value for sorting since the job list is very volatile. And using sort {} didn't help with incomplete dependencies.
Thanks
Back to
Seekers of Perl Wisdom
|
|