I am trying to get the last element of the anonymous array below. Using $# I keep getting the 1st element (or so it seems anyway). What am I doing wrong?
$server {TED0} = ['SERVER1', 'SERVER2', 'SERVER3']; push @{$server{TED0}}, "SERVER4"; push @{$server{TED0}}, "SERVER5"; print "\nFull array is: @{$server{TED0}}\n"; $last = ${$server{TED0}}[$#]; print "\nThe last element is: $last \n";