in reply to Trying to use Spreadsheet::WriteExcel. What could be the problem?
Example, ask yourself, is an Interface information always in a block that has a form that always starts with the /^Interface\s(\w+)$/ ? If so, then read in the file, pushing each (chomped) line into an array. When you get to the next Interface block, process the array you have built up in a function (to make the code look cleaner). In this function you can iterate over each element of the array looking for the data you want to extract (vrid, state, etc) and print it out (or pass that info on to another function that does the printing).
This way you keep your code looking clean and polished, thus easier for you and others to read and understand. It will also be easier for you to debug. You can then easily figure out why your code mixes up the interfaces and the addresses.
-imran
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trying to use Spreadsheet::WriteExcel. What could be the problem?
by sunny (Initiate) on Feb 15, 2006 at 07:25 UTC | |
|
Re^2: Trying to use Spreadsheet::WriteExcel. What could be the problem?
by Anonymous Monk on Feb 15, 2006 at 07:23 UTC | |
by CountOrlok (Friar) on Feb 15, 2006 at 15:01 UTC |