Then I thought about adding some more queries to my SNMP scan parsing script, and thought to myself "Hmmm, why not try to refactor my current routines to be more generic."
The statements asserting that I am not quite sure what I am trying to do are fair. In response I can only offer, that I am trying to do something out of my comfort zone to improve my skills. The reason that I am asking for help is that I have failed to achieve that "Aah-ha!" moment, and the underlying mindset of reducing functionality to a base-case has not come.
So to that end, I shall rephrase. If you, the great and esteemed monks :-), were to write a block of code that could be handed string, and return a hash keyed with interface names with values of MAC addresses, such that the behavior of the lookups of the information and the OIDs changed based on the kind of device the script found, what would be the your first step in dividing this problem into discreet elements of function.
Below you'll find the entirety of the script, which; I hope, will provide some context to the Monks. moved code to the top-level message
In reply to Re^6: Advice on transforming a sub into a re-entrant recursive-able method.
by hechz
in thread Advice on transforming a sub into a re-entrant recursive-able method.
by hechz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |