Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: Cisco to Juniper - parser help

by GrandFather (Saint)
on May 25, 2021 at 07:05 UTC ( #11133006=note: print w/replies, xml ) Need Help??

in reply to Re: Cisco to Juniper - parser help
in thread Cisco to Juniper - parser help

A large block of global vars set to some arbitrary initial value is a code smell, nay, a code stink. With a cursory glance at the code it seems likely that the warnings are really and truly saying something important about the logic of the code. I would remove all the global variables then put them back in the smallest scope that makes sense, ideally initializing the variables where they are declared with an appropriate value rather than just any old value to shut up the warnings.

If the code logic dictates that the variables are populated piecemeal during multiple passes through the loop I'd either add code to handle unexpectedly unpopulated values or fix the logic errors as appropriate. In either case just shutting up the warnings is stinky coding.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133006]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-10-22 10:16 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.