in reply to How to dereference array of ref.s?
you can dereference using braces and prepending the right sigyl; print ${ $a[0] }
Standard doc is perlref
Your array element is just a plain scalar and you must learn just how to derefence a sclar. Infact is the same of: my $ref = \'qwerty'; print ${ $ref }
If no confusion is possible, as in my second example, you can dereference without braces like in print $$ref or using postfix dereference use feature 'postderef'; my $ref = \'qwerty'; print $ref->$* but see the above docs for versions of perl that have this feature enable or usable.
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to dereference array of ref.s?
by haukex (Archbishop) on May 20, 2018 at 18:14 UTC | |
|
Re^2: How to dereference array of ref.s?
by nikolay (Beadle) on May 20, 2018 at 15:00 UTC |