Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Binary-strings/Perl/binary-strings.pl
Normal file
12
Task/Binary-strings/Perl/binary-strings.pl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
$s = undef;
|
||||
say 'Nothing to see here' if ! defined $s; # 'Nothing to see here'
|
||||
say $s = ''; # ''
|
||||
say 'Empty string' if $s eq ''; # 'Empty string'
|
||||
say $s = 'be'; # 'be'
|
||||
say $t = $s; # 'be'
|
||||
say 'Same' if $t eq $s; # 'Same'
|
||||
say $t = $t .'e' # 'bee'
|
||||
say $t .= 'keeper'; # 'beekeeper'
|
||||
$t =~ s/ee/ook/; say $t; # 'bookkeeper'
|
||||
say $u = substr $t, 2, 2; # 'ok'
|
||||
say 'Oklahoma' . ' is ' . uc $u; # 'Oklahoma is OK'
|
||||
Loading…
Add table
Add a link
Reference in a new issue