in reply to Save Split to Array
Instant code smell at this point. I don't even want to look further.my $mgt_address = ''; my $dhcp_pool = ''; my $dhcp_network = ''; my $dhcp_mask = ''; my $dhcp_dgw = ''; my $wism_slot = ''; my $service_vlan = ''; my $native_vlan = ''; my $slot_list = ''; my @slots; my $current_host = ''; my @ip_hosts; my $vlan_list = ''; my %vlans; my @network; my $apply_status = ''; my $i; my $status; my $MYFILE; my $quit = 'n'; my $vlan_number; my $vlan_name; my @pieces; my @vlan_numbers; my @vlan_names; my @different; our $config_string;
I see a number of variables that looks like they should have been a hash, for example. I also see variables needlessly initialized, out of some ritualistic cargo-cult behavior hoping to scare away warnings by simply working around them.
-- Randal L. Schwartz, Perl hacker
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
|
|---|