- or download this
sub baz ($this, $that) {
warn '@_ contains ', scalar(@_), " elements.\n";
}
baz('hello', 'world') # @_ contains 2 elements.
- or download this
sub foo ($this, $that = 'world') {
warn '@_ contains ', scalar(@_), " elements.\n";
}
foo('hello'); # @_ contains 1 elements.
- or download this
#!/usr/bin/env perl
...
note "\n\nTesting foo()";
foo("a");
- or download this
1..8
#
...
# Looks like you failed 2 tests of 8.
shell returned 2