in reply to The use of documentation.
in thread What is it about perl that makes perl so cool?
I use them all of the time, and the trick is that they are not very hard (at least not in Perl). For instance a hash of hashes? That is just a directory structure:
It is just an odd delimiter. *shrug*# Name it absolutely $foo{some}{path}{to}{the}{thing}{I}{want} = "something"; # Or relatively: my $h_ref = $foo{some}{path}; foreach my $thing (keys %$h_ref) { print "Found key '$thing' with value $h_ref->{$thing}\n"; }
For the next trick look at map and grep and the general list-oriented nature of Perl and see it as a Unix pipeline written (unfortunately) right to left instead of left to right. Now stare at the Schwartzian sort and see why it is so natural.
In no time these "advanced" techniques will feel like part and parcel of how things work... :-)
|
---|