postman has asked for the wisdom of the Perl Monks concerning the following question:
I've a feeling it should be something along the lines of @hash{@keys} = @values; which I've seen on another thread, but I can't quite get there. TIAuse strict; sub new { my $class_name = shift; my $self = {}; #want to do something like this ... @self->{sec,min,hour,mday,mon,year,wday,yday,isdst}=localtime(); bless ($self,$class_name); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: adding an array of instance variables and an array of values
by broquaint (Abbot) on Jun 28, 2002 at 13:30 UTC | |
|
•Re: adding an array of instance variables and an array of values
by merlyn (Sage) on Jun 28, 2002 at 13:31 UTC | |
by postman (Acolyte) on Jun 28, 2002 at 14:14 UTC | |
|
Re: adding an array of instance variables and an array of values
by bronto (Priest) on Jun 28, 2002 at 22:03 UTC |