Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/String-prepend/Perl/string-prepend.pl
Normal file
21
Task/String-prepend/Perl/string-prepend.pl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use feature ':all';
|
||||
|
||||
# explicit concatentation
|
||||
$_ = 'bar';
|
||||
$_ = 'Foo' . $_;
|
||||
say;
|
||||
|
||||
|
||||
# lvalue substr
|
||||
$_ = 'bar';
|
||||
substr $_, 0, 0, 'Foo';
|
||||
say;
|
||||
|
||||
|
||||
# interpolation as concatenation
|
||||
# (NOT safe if concatenate sigils)
|
||||
$_ = 'bar';
|
||||
$_ = "Foo$_";
|
||||
say;
|
||||
Loading…
Add table
Add a link
Reference in a new issue