switch($choice) { case 'c' .... .. .. case 'q' { &disconnect_db; print $clear; exit(); } }