# I'll use the insert sub as an example sub insert { my $class = shift; my ($table,$seq_query,$primary_key); # grab the variable defined from the derived class # this is hacky $table = ${$class . "::table"}; $primary = ${$class . "::primarykey"};