in reply to Re^2: Unifying namespaces of @name and $name to simplify dereferencing?
in thread Unifying namespaces of @name and $name to simplify dereferencing?
well obviously you are passing a hash ref in this model because of the curlies {}sub name { my $name = shift; exists $name{$name} and return $name{$name};
No. The name passed in (update: in normal behavior, obviously) is a string, the $name{...} lookup is into a previously defined hash:
my %name; my @name;
Update: it is in your model where confusion arises about the type of the passed $name.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Unifying namespaces of @name and $name to simplify dereferencing?
by LanX (Saint) on Mar 25, 2016 at 19:43 UTC |