Brain Block

chaoticset on 2002-02-13T00:26:04

I faithfully attempted to fiddle with the sub set{} that Pudge gave me in earlier commentary. The function
sub weight {
my ($self, $data) = @_;
$self->{_data}{"weight"}=$data;
}

works, it would seem, because if I use the
sub get {
my ($self, $key) = @_;
return $self->{_data}{$key};
}
like so: $neuron->get("weight"); then it works.

This makes me think I can just call an array @neurons, and then create new instances and dump them into said array. Or, even, create them as hash elements, where the name is the name and the value is the object instance.

Feh. I don't even know if I'm using most of these terms properly.

I could use a sandwich and some iced tea.