in reply to Print last element using perl reference

And of course the last actual value is $arr_ref->[-1].