repo.or.cz
/
perlbook.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial commit from the 2013 with minor fixes. From now and then,
[perlbook.git]
/
l49.pl
blob
f83a73fb9fc81a6c8105e94780641f06585996fc
1
#!/usr/bin/perl -w
2
use
strict
;
3
use
warnings
;
4
use
utf8
;
5
binmode
(
STDOUT
,
':encoding(utf8)'
);
6
my
$text
=
'Я ужасный мутант хомячек.'
;
7
my
$text2
=
'Научный сотрудник'
;
8
9
$text
=~
s/(\w*)(.*)\./$1, \l$1, \l$1-$2!/
;
10
print
"
$text
\n
"
;
11
12
$text2
=~
s/(.*)/$1 в белом халате! А ну-ка давай еще!/
;
13
print
"
$text2
\n
"
;