nick_2012 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Perl Monks,
I have an input file of the format:
instance A {
net1
net2
instance B {
net3
net4
instance C {
net5
net5
}
instance D {
net7
net8
}
}
instance E {
net9
net10
}
}
can you propose a perl script which can parse this and produce an output which looks like:
net1
net2
B/net3
B/net4
B/C/net5
B/C/net6
B/D/net7
B/D/net8
E/net9
E/net10
I cant seem to figure an easy way of going up and down the hierarchy in the instance file and printing the same to each of the nets in the file...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: saif format parsing
by Gangabass (Vicar) on Aug 06, 2012 at 12:36 UTC | |
by nick_2012 (Initiate) on Aug 07, 2012 at 13:30 UTC |
Back to
Seekers of Perl Wisdom