# demo_std.pl —— Perl 第一层：**标准输出**（std）
# demo_std.pl -- Perl layer 1: **standard output** (std)
#
# 只用 print 与 for 循环，不碰 Crt / BGI / 宿主 ui_*。
# Only print and a for loop; no Crt / BGI / host ui_*.
#
# 跑法（桌面 vmlcli）：
# How to run (desktop vmlcli):
#   dotnet scripts/vmlcli/bin/Release/net10.0/vmlcli.dll Examples/perl/demo/demo_std.pl
#
# 本前端的两个事实：
# Two facts about this frontend:
#   ① 换行就是语句分隔符，`;` 可有可无。
#   ① a newline is a statement separator; `;` is optional.
#   ② 字符串插值 $name 与 `.` 拼接都可用；算术按整数/浮点两条通道自动选。
#   ② string interpolation $name and `.` concatenation both work; arithmetic picks the int/float channel.

print "=== Perl 标准输出 demo ===\n";
print "=== Perl standard output demo ===\n";
print "你好，世界 / hello, world\n";
print "整数: ", 42, "\n";
print "计算: 7 * 6 = ", 7 * 6, "\n";

my $sum = 0;
for my $i (1..10) {
    $sum = $sum + $i;
}
print "循环求和: 1..10 = $sum\n";
