--- Michael Fowler <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 26, 2001 at 05:27:28PM -0700, Paul wrote:
> > sub pushHash (\%@) { # somebody please check that prototyping
>
> > local *INHASH = shift;
>
> This is clever, but should probably be avoided (mostly because it's
> clever).
lol -- thank you, and I concur. =o)
> > my %tmpHash = ( @_ );
> > @INHASH{keys %tmpHash} = values %tmpHash;
> > }
>
> It'd probably be better to use one of the iterative examples, if
> you're going to be sticking it in a function. They scale better
> with regard to memory as @_ gets bigger.
Very good point.
> > pushHash(\%target, @listToAdd);
>
> This call would raise a fatal exception. The first argument must be
> a hash, not a hash reference.
I thought that was the one that would work, lol!
Don't have a machine with Perl on it to test such things here....
> > or even (I *think*):
> >
> > pushHash %target, -x => 24, -y => 25, -z => 26;
>
> This is the call you'd have to use.
It's the one I prefer if I can't use the other structure -- I'd rather
not put it into a function at all! lol!!!
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]