标签:
# perl6 for 循环 # 基本循环 for 1, 2, 3, 4 { .say } for 1..4 { .say } for ^4 {.say} loop (my $i = 0; $i < 5; $i++) { print $i; } my@nums=1..4; for @nums { .say } # 其它形式 for ^4 { say "$_"; } for ^4 { say "$^first"; } for ^4 { say "$^seconds, $^first"; } for ^6 { say "$^first, $^seconds, $^third"; } .say for (1..4); .say for 1..4;
标签:
原文地址:http://www.cnblogs.com/ddline/p/4316015.html