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