Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Seeking guidance for more idiomatic way of (re)writing this script.

by keszler (Priest)
on Jan 14, 2013 at 20:23 UTC ( #1013269=note: print w/ replies, xml ) Need Help??


in reply to Seeking guidance for more idiomatic way of (re)writing this script.

Quick observations:

  • line 32: \s includes \t so tab not needed; split defaults to whitespace so \s not needed.
  • lines 34,35: if username/password are the same on all NAS arrays, set the variables before the loop
  • line 47: include $ipaddr in die message
  • line 61: m// defaults to checking $_ so if (/contacted$/) is sufficient


Comment on Re: Seeking guidance for more idiomatic way of (re)writing this script.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-30 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls