I've posted an extended example that processes multiple Networks per file below, but you may not understand how it works, and may therefore hove problems adapting it for your real program.
Given your current level of Perl skill, I think that you are more likely to understand one of the other solutions presented in this thread, particularly grandfather's with which you have already had extensive help. I think that you should probably get yourself a good Perl book and take the time to play with a few small programs of your own before attempting more complicated tasks.
produces
C:\test>junk1
A, WEB_A, 145, Master, 194.551.205.250, 1, 135.51.045.242
A, WEB_B, 145, backup, 19.51.205.20, 2, 135.51.05.22, 321.654.987.111
A, WEB_C, 145, backup, 19.51.205.20, 3, 135.51.05.22, 123.456.789.001,
+ 321.654.987.111
B, WEB_A, 145, Master, 194.551.205.250, 1, 135.51.045.242
B, WEB_B, 145, backup, 19.51.205.20, 2, 135.51.05.22, 321.654.987.111
B, WEB_C, 145, backup, 19.51.205.20, 3, 135.51.05.22, 123.456.789.001,
+ 321.654.987.111
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|