Created
September 11, 2009 16:43
-
-
Save rakudo/185407 to your computer and use it in GitHub Desktop.
This file contains 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
$ cat main.p6 | |
multi sub MAIN ($mode where 'css') { say "You're in the CSS option"; } | |
multi sub MAIN () { say "You didn't enter an option"; } | |
multi sub MAIN ($mode, $arg) { say "You entered two command line arguments"; } | |
multi sub MAIN ($mode) { say "Unknown mode $mode"; } | |
$ ./perl6 main.p6 | |
You didn't enter an option | |
$ ./perl6 main.p6 foobar | |
Unknown mode foobar | |
$ ./perl6 main.p6 bar baz | |
You entered two command line arguments | |
$ ./perl6 main.p6 css | |
You're in the CSS option | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment