I am just wondering what does the curly bracket in between the string "name" means in Perl as per the example below? This is my first question, please be gentle and i am pretty new with perl
my $pool_name = $result->get->pool_attr("name")->{"name"};
Perl is a little terse this way. There are two concepts to understand here :-
Just like java, we can have references in perl. Think of them as pointers in C if you are from C background. Now, if we want to access anything using the references, we use the "->" symbol. There are more concepts to this like blessing etc.But we won't go into that. But one important thing is that Perl Objects are also like HASH. And hence , all access to the perl Object members etc. are done in a similar fashion to HASH (HASH references , not hash objects).
So, we have an object $result. $result->get calls the Get method on the Object. This method returns another object to you. Let's call it temp.
Now , on this object again, we call a member function pool_attr with a functional argument "name". This function returns the HASH to you finally.
Remember that Perl HASHes behave similarly to the perl Objects, so we access the "name" key using similar notation.
You can use print Data::Dumper::Dumper function and it will tell you more about the data structure. However note that perl Objects are kind of a hack so you might see a lot of unnecessary clutter with Data::Dumper::Dumper.