$actions = $CGI->param ('action'); $to_do = new INVOICES(); if ($actions eq 'delayedinv') { $to_do->delayedinv() } elsif ($actions eq 'del_inv') { $to_do->del_inv() } elsif ($actions eq 'payed' ) { $to_do->payed () } elsif ($actions eq 'stats' ) { $to_do->stats () } ... skip ... else { $to_do->defscreen()}