[Jerusalem.pm] Variable length array to ref

Issac Goldstand margol at beamartyr.net
Wed Jan 19 04:15:25 PST 2005


Hi mongers,
  I've got a function that takes a variable number of parameters.  After I 
parse a few (by shift()ing them), I want to assign what's left to a 
variable.  Currently, I do:  $self->{uc($param)}=@_;

I could swear that this used to work.  But now, it doesn't.  It always sees 
a scalar context so returns #@_ (the number of elements in @_)  How can I 
get whatever happens to be left in @_?  (i feel silly asking this - I feel 
there's a simple solution that i'm probably overlooking since I've confused 
myself too much with the code around this)

Thanks!
  Yitzchak 




More information about the Jerusalem mailing list