sub extract_and_add { my ($colon_sep_string, $extra_elem) = @_; my ($first, $second, $third, $ignore) = split( /:/, $colon_sep_string ); return join('-', $second, $third, $extra_elem); }