Perl port of cc_mux