[問題] 請問一段語法的意思
$HoA{flintstones}[0] = "Fred";
# another element
$HoA{simpsons}[1] =~ s/(\w)/\u$1/;
# print the whole thing
print "\n";
foreach $family ( keys %HoA ) {
print "$family: @{ $HoA{$family} }\n"
}
想請問紅色部分的意思 perl 可以令變數=regular expression嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.32.180.150
※ 文章網址: https://www.ptt.cc/bbs/Perl/M.1464787544.A.04B.html
※ 編輯: gecer (114.32.180.150), 06/01/2016 21:26:10
※ 編輯: gecer (114.32.180.150), 06/01/2016 21:26:42
※ 編輯: gecer (114.32.180.150), 06/01/2016 21:27:31
推
06/01 21:46, , 1F
06/01 21:46, 1F
→
06/01 21:48, , 2F
06/01 21:48, 2F
Perl 近期熱門文章
PTT數位生活區 即時熱門文章