tie my %h, 'Numbers', $file; my $obj = tied %h; $obj->export2mysql; # further methods..