What do you expect "standard_unix_corp-cis_shared"+"standard_unix_corp-cis_shared" to give? You shouldn't be adding all the fields together.
foreach my $index (0..$#line)
should be something like
foreach my $index (4,5)
By the way,
$servers{$name} = [@line];
needlessly copies @line. Simply use
$servers{$name} = \@line;
since my @line; will create a new var for you every pass.
In reply to Re: Adding numeric values while keeping string values
by ikegami
in thread Adding numeric values while keeping string values
by Urbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |