[ create a new paste ] login | about

Link: http://codepad.org/c50QZWTV    [ raw code | output | fork ]

skeletonkey - Perl, pasted on Oct 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
f(10);
f("Hello World");
f();
f(0);
f('');

sub f {
    my $x = shift;
    if (defined $x) {
        print("Present $x\n");
    }
    else {
        print("Not Present\n");
    }
}


Output:
1
2
3
4
5
Present 10
Present Hello World
Not Present
Present 0
Present 


Create a new paste based on this one


Comments: