in reply to a reference to an element of an array or hash: how to create?

The same way you'd make a reference to any other structure: the backslash operator:
my $p = \$a[2];


Unless I state otherwise, all my code runs with strict and warnings

Replies are listed 'Best First'.
Re^2: a reference to an element of an array or hash: how to create?
by arifsaha (Acolyte) on Aug 05, 2008 at 15:04 UTC

    Duh! I should try it first, didn't think it will be that easy before.

    Thanks everyone!

    -- 
    S P Arif Sahari Wibowo
    http://www.arifsaha.com/