in reply to Re: Passing a list to an Object
in thread Passing a list to an Object

Sorry about the typo's.

Okay now that I've got this situation, what's the easiest way to get around it?

How does one pass a list and not wind up with an odd numbered hash?

Replies are listed 'Best First'.
Re: Re: Re: Passing a list to an Object
by danger (Priest) on Jan 13, 2001 at 07:30 UTC

    Simply shift off the first argument from @_ before proceeding with messing with it:

    sub doThat { my $self = shift; my %ARGS = (chew => 'meat', @_); return "I like to chew $ARGS{chew}!\n"; }
      ah... delightfully simple.

      You'd be suprised at the weird and wonderful convulsions of code my brain was cooking up without the aid of that tasty tidbit.

      Much thankyou's and may you monkdom be more comfy than an old pair of jeans.