multi sub trim($str) { # return modified value } multi sub trim($str is rw) { # modify in place }