RE: Getting last element of anonymous array

2003-11-15 Thread Charles K. Clarkson
Paul Harwood [mailto:[EMAIL PROTECTED] : : 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"; :

Re: Getting last element of anonymous array

2003-11-15 Thread James Edward Gray II
On Nov 14, 2003, at 12:25 PM, Paul Harwood wrote: $last = ${$server{TED0}}[$#]; Replace $# with -1. James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]