in reply to Reference as the only Object element
Try $self= [@_]; [(update2) in place of $self= \\@_;].
Update: I'd say more but I can't figure out what
I wasnīt able to "pass this reference" returned from Parser to the reference member of the Entry object.means. I was around when
Someone here at the Chatterbox told me, that this indeed isnīt possibleand I'll wager that we didn't understand what was being asked.
Anyway, I wouldn't ever put \@_ into an object as changes to @_ would be reflected in the object and I'm not sure what changes Perl itself might make to @_ when the subroutine exits. Also, the elements of @_ are aliases to the arguments passed in (that is \$_[0] == \$arg0) so changing $_[0] changes the variable (in the caller) that was passed in and vice versa. But [@_] creates a new anonymous array and copies the elements of @_ into it and so shouldn't suffer from these two problems.
But none of that explains to me why \\@_ would work. /:
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Reference as the only Object element
by PetaMem (Priest) on Nov 02, 2001 at 21:42 UTC | |
by dragonchild (Archbishop) on Nov 02, 2001 at 21:58 UTC | |
by tye (Sage) on Nov 02, 2001 at 23:10 UTC | |
by dragonchild (Archbishop) on Nov 02, 2001 at 23:22 UTC |