in reply to can understand one line of code
Break it down:
start with 's', so it is a substitution.
The #s are delimiters so the two sides are: $ and $RegObj->{DELIM}
So it is substituting the module defined delimiter for any '$'s every end of line.
Contains an assignment: $RegObj->{MEMBERS}= [ @{$RegObj->{SUBKEYS}} ]
It copies the array of subkeys : @{ $RegObj->{SUBKEYS} } into an anonymous array [ ... ]
And assigns its reference to $RegObj->{MEMBERS} = ...
Then it dereferences that to supply the subkeys to grep.
Thus, that one line is equivalent to:
my @temp = @{ $RegObj->{SUBKEYS} }; $RegObj->{MEMBERS} = \@temp; grep s[$][$RegObj->{DELIM}], @temp;
Without the need for @temp; but less efficient.
|
|---|