Advertisement
cwchen

[Perl 6] Creating a subroutine with default values

Nov 15th, 2017
1,005
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.09 KB | None | 0 0
  1. sub hello($name = "World") {
  2.     "Hello {$name}".say;
  3. }
  4.  
  5. hello();
  6. hello("Michael");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement