multi sub trim($str) { # return modified value } multi sub trim($str is rw) { # modify in place } #### subtest 'trim' => sub { is("leading", trim(" leading"), "trim: leading"); #### $ perl -we 'use Test::More tests => 1; is "leading", " leading", "trim: leading"' 1..1 not ok 1 - trim: leading # Failed test 'trim: leading' # at -e line 1. # got: 'leading' # expected: ' leading' # Looks like you failed 1 test of 1.