Hi,
does anyone knows how is it possible to derefencing a array that is hash referencing?
| SitePoint Sponsor |
Hi,
does anyone knows how is it possible to derefencing a array that is hash referencing?
Which language?
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
Hi, it is perl



Your question makes no sense. Can you rephrase and include some sample code of what you're trying to do?
Cheers,
D.





Code:use strict; use warnings; use 5.010; my $arr = [ { a => 1, b => 2}, { c => 3, d => 4}, ]; say $arr->[0]->{b}; --output:-- 2 my $hash = { a => [1, 2, 3], b => [10, 20, 30], }; say $hash->{b}->[2]; --output:-- 30





http://perlmeme.org/howtos/using_per...ferencing.html
shows three ways to do it.
Bookmarks