in reply to Problems With Hash Pointer Assignments
You are deleting the data refered to by $HashData (and in an unidiomatic way: better to say %$HashData = () if you really want that -- but you don't), and are then populating it with a copy of whatever was (refered to) in $value. Why? If $value has the correct data, why doesn't DeleteValueTreeWithinHash() simply return it? Oh, you want an IN/OUT function? Fine, then why doesn't RecursiveFunctionToDeleteValueWithinHash() really do what it name claims and modify the data referenced by its argument?%{$HashData} = undef; %{$HashData} = %{$value};
Do yourself a favor and read perlref (or perlreftut) carefully.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems With Hash Pointer Assignments
by EchoAngel (Pilgrim) on Nov 30, 2004 at 20:45 UTC | |
by gaal (Parson) on Nov 30, 2004 at 20:55 UTC | |
by EchoAngel (Pilgrim) on Nov 30, 2004 at 21:21 UTC |