package X; use strict; sub printlist { my ($self, @L) = @_; for my $prop (@L) { if ($self->{established}->{$prop}) { warn "$prop established"; } else { warn "$prop NOT established"; } } } my $self = {} ; bless $self, 'X'; my @L = qw(intro_cs comp_org adv_prog theory); my @M = qw(intro_req); $self->{established}->{$_}++ for @L; $self->printlist(@L); $self->{established}->{$_}++ for @M; $self->printlist(@M);