language: Perl (perl 5.16.2)
date: 539 days 13 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
function("joe",undef); # should print "joe" and "NULL"
function("max",38);    # should print "max" and "38"
function("tim",0);        # should print "tim" and "0"
 
sub function {
    my($person,$age) = map { $_ || "NULL" } @_;
    print "person: $person\n";
    print "age:    $age\n";
}