ColoTotals::init(); You can do: use ColoTotals; init(); #### my $totals = ColoTotals->new(); $totals->init(); $totals->process(); $totals->finish();