sub cleararray { my $class = shift; # ignored my $radiovar = shift; ... } # then call as: PATTERNS->cleararray($someRadioVar);