sub access { my ($self, $arg) = @_; return $self->{$arg}; } ... my $arg='B';