I need the benefit of your advice once again fellow monks ...
I'm try to add a list of object variables and values all at once, but can't quite figure it out except by the most laborious way of adding them one at a time.
The relevant part of my code is this:
use 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);
}
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.
TIA