... and if you want to interpolate it into a string before you print it, such scalar elements of arrays and hashes, however deeply nested or directly or indirectly referenced, interpolate like any other scalar:
>perl -wMstrict -le "my $data = [ {'name' => 'Mary'} ]; ;; print qq{---$data->[0]{name}---}; " ---Mary---
In reply to Re: Access to hash ref element
by AnomalousMonk
in thread Access to hash ref element
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |