Created
November 14, 2012 13:24
-
-
Save syohex/4072045 to your computer and use it in GitHub Desktop.
Perl prototype is too difficult to understand
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; | |
sub with_prototype ($) { | |
print "@_\n"; | |
} | |
with_prototype(()); # OK, pass undef | |
with_prototype(("a", "b")); # OK, pass 'b', ignore 'a' | |
with_prototype("a", "b"); # Compile Error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment