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
|
---|
In Section
Seekers of Perl Wisdom