a_ashokkumar has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have the following problem at hand:
There are a set of tasks some of which are dependent on others. I have the input file that looks like:
Task1 Task2 Task3
Task2 Task2 Task4
Task3 Task1 Task4
Task5 Task2 Task3
.
.
.
Basically, the first element on any line is the task that is dependent on the remaining tasks mentioned in the line. For eg., Task1 is dependent on Task2 & Task3 & so on.
I am supposed to read the file contents & resolve the dependencies between the tasks & come up with a list that has the least dependent task first & the most dependent task at the end of the list.
Is there a simple PERL way of sequencing the tasks?
Thanks,
Ashok
There are a set of tasks some of which are dependent on others. I have the input file that looks like:
Task1 Task2 Task3
Task2 Task2 Task4
Task3 Task1 Task4
Task5 Task2 Task3
.
.
.
Basically, the first element on any line is the task that is dependent on the remaining tasks mentioned in the line. For eg., Task1 is dependent on Task2 & Task3 & so on.
I am supposed to read the file contents & resolve the dependencies between the tasks & come up with a list that has the least dependent task first & the most dependent task at the end of the list.
Is there a simple PERL way of sequencing the tasks?
Thanks,
Ashok
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Task scheduling using perl
by Roger (Parson) on Aug 18, 2005 at 13:40 UTC | |
Re: Task scheduling using perl
by Fletch (Bishop) on Aug 18, 2005 at 13:41 UTC | |
Re: Task scheduling using perl
by davidrw (Prior) on Aug 18, 2005 at 13:42 UTC | |
Re: Task scheduling using perl
by ikegami (Patriarch) on Aug 18, 2005 at 15:17 UTC | |
Re: Task scheduling using perl
by radiantmatrix (Parson) on Aug 18, 2005 at 16:39 UTC | |
Re: Task scheduling using perl
by tlm (Prior) on Aug 19, 2005 at 00:19 UTC |
Back to
Seekers of Perl Wisdom