Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

RE: DHCP and DNS Compare

by chromatic (Archbishop)
on Mar 30, 2000 at 22:25 UTC ( #6543=note: print w/ replies, xml ) Need Help??


in reply to DHCP and DNS Compare

Always check the status of your open calls! You'll spend less time debugging mysterious errors, I promise. open (DHCPCMD, "dhcpcmd $DHCPserver enumclients $scope|") || die "Can't get DHCP information: $!"; Use sprintf instead of twodigit(): my $day = sprintf("%02d", localtime->mday); I'm not sure what comparehashes() is doing, especially as you refer to $1 but don't appear to grab it from anywhere. Instead, I'd lc() machine names when assigning them to %dhcphash and %dnshash and just use the eq operator to compare them.

Finally, I like to check the return values of my close() calls. No pun intended. If something goes wrong here, I want to know about it.


Comment on RE: DHCP and DNS Compare
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-07-23 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (139 votes), past polls