From: Peter Scott <[EMAIL PROTECTED]> > If you want to return the number of entries in the array, you'd need > to do > > sub num_get > { > my $what = pop; > eval "$#$what"; > }
No need for eval. it doesn't hurt you this time since you are eval()ing a number ... the last index to that array, but anyway. See: #!perl @array = (0,1,2,3); $what = \@array; $something = "$#$what"; print "Gonna eval: $something\n"; print "Result: ".eval($something)."\n"; __END__ Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]