$a->[2]->{"bar"}
which is equivalent and also works, but suffers from the explosion of punctuation that Perl often gets criticised for. There's an element of Do What I Mean where the first arrow says this is a reference and work the rest out for me.