Tuesday, 10 September 2013

Perl expression using a combination of hash and array

Perl expression using a combination of hash and array

I have difficulty understanding a piece of code. The statement is:
push(@{$errorfile{$var}}, $filepath);
I believe that push is used to append a value to the end of an array. But
the above expression is confusing me. There is a hash and there is a @
symbol being used(which is usually used with array names). In the
beginning of the code the "errorfile" is declared as:
my %errorfile;
Can someone please help me out here?

No comments:

Post a Comment