in reply to Re^3: Preferred technique for named subroutine parameters?
in thread Preferred technique for named subroutine parameters?
Inside an anonymous hash or in a 'flat' list, a hash reference (or any reference) will just get stringized away if you try to use it as a hash key (unless you invoke some other magic).
>perl -wMstrict -le "sub func { my %args = @_; print keys %args } func({ bar => 'baz' } => 'foo'); func({ fee => 'fie' } , 'foe'); " HASH(0x225398) HASH(0x225398)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Preferred technique for named subroutine parameters?
by akho (Hermit) on May 22, 2009 at 21:09 UTC | |
by AnomalousMonk (Archbishop) on May 22, 2009 at 21:41 UTC | |
|
Re^5: Preferred technique for named subroutine parameters?
by LanX (Saint) on May 22, 2009 at 22:06 UTC | |
by AnomalousMonk (Archbishop) on May 22, 2009 at 22:24 UTC | |
by LanX (Saint) on May 23, 2009 at 02:40 UTC | |
by AnomalousMonk (Archbishop) on May 23, 2009 at 04:13 UTC | |
by LanX (Saint) on May 23, 2009 at 12:10 UTC | |
|