Created
November 19, 2017 18:17
-
-
Save andrewsolomon/323a2b317ea5903f662fbaaded254798 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dump 'pp'; | |
sub foo { | |
my %args = ( | |
@_ | |
); | |
if (exists($args{bar})) { | |
print "You passed in bar: ".pp($args{bar})."\n"; | |
} | |
else { | |
print "No bar here! \n"; | |
} | |
}; | |
foo( bar => undef ); | |
foo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment