# perl -le '$str='Camelcase'; $str =~ s/(?<=[a-z])(?=[A-Z])/_/g; print $str;' Camelcase