Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
[Perl 6] Creating a subroutine with default values
cwchen
Nov 15th, 2017
1,719
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Perl 6
0.09 KB
| None
|
0
0
raw
download
clone
embed
print
report
sub
hello
(
$name
=
"World"
)
{
"Hello {$name}"
.
say
;
}
hello
(
)
;
hello
(
"Michael"
)
;
Advertisement
Public Pastes
Untitled
1 hour ago | 14.62 KB
Untitled
1 hour ago | 6.77 KB
Untitled
3 hours ago | 12.86 KB
Untitled
3 hours ago | 8.35 KB
Untitled
5 hours ago | 26.83 KB
Untitled
7 hours ago | 22.69 KB
Untitled
7 hours ago | 9.33 KB
Untitled
9 hours ago | 20.56 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!