Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
24
Task/String-prepend/Perl-6/string-prepend.pl6
Normal file
24
Task/String-prepend/Perl-6/string-prepend.pl6
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# explicit concatentation
|
||||
$_ = 'byte';
|
||||
$_ = 'kilo' ~ $_;
|
||||
.say;
|
||||
|
||||
# interpolation as concatenation
|
||||
$_ = 'buck';
|
||||
$_ = "mega$_";
|
||||
.say;
|
||||
|
||||
# lvalue substr
|
||||
$_ = 'bit';
|
||||
substr-rw($_,0,0) = 'nano';
|
||||
.say;
|
||||
|
||||
# regex substitution
|
||||
$_ = 'fortnight';
|
||||
s[^] = 'micro';
|
||||
.say;
|
||||
|
||||
# reversed append assignment
|
||||
$_ = 'cooper';
|
||||
$_ [R~]= 'mini';
|
||||
.say;
|
||||
Loading…
Add table
Add a link
Reference in a new issue