James Edward Gray II wrote: > > my $self; > > $self isn't a reference to a hash, even though you're about to start > using it like one. > > my $self = { }; > > > $self->{BOOL_1} = 0; > > $self->{BOOL_2} = 0;
Actuaqlly, it will work the way he has it. The anonymous hash is auto-vivified on first assignment: Greetings! E:\d_drive\perlStuff>perl -w my $self; $self->{'up'} = 'high'; $self->{'down'} = 'Hi'; print "$_: $self->{$_}\n" foreach keys %$self; ^Z down: Hi up: high I do agree, though, that assigning the empty hash reference at declaration is more self-commenting. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]