chdir($g_var->{g_loc});
I found this line in some perl code I am working with and I could not figure out what the -> means. I mean I cant find the meaning of the syntax. By the way, g_loc is the name of a folder. What am i missing here ?
P.S. i am only 4 days into perl.
->is dereferencing a reference.$g_varcontains a reference to a%hash(elements of which you’d access using$hash{key}).You can find more information about references in the
perlreftutandperlrefdocumentation. There’s alsoperllolabout lists-of-lists (nested references).You can open the documentation using
perldoc perlreftut, etc.