in reply to Re: can't use string as an array ref
in thread can't use string as an array ref

$server_list_hash{$server}[ $server_count{$server}++ ] = "$role|$cto|$ +app_manager|$location";
there are duplicate servers and I'm trying to put them in an array

Replies are listed 'Best First'.
Re^3: can't use string as an array ref
by kennethk (Abbot) on Mar 26, 2015 at 17:51 UTC
    Are you sure that's the only write access happening to your hash? This sounds like a good time for peppering your script with print statements to see when the corruption happens. print "$server_list_hash{$server}\n";

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.