#Document:
#!/usr/bin/ruby -w print <<EOF This is the first way of creating here document ie. multiple line string. EOF print <<"EOF"; # 与上面相同 This is the second way of creating here document ie. multiple line string. EOF print <<`EOC` # 执行命令 echo hi there echo lo there EOC print <<"foo", <<"bar" # 您可以把它们进行堆叠 I said foo. foo I said bar. bar
语法
BEGIN { code }声明 code 会在程序运行之前被调用。
语法
END { code }声明 code 会在程序的结尾被调用。
[ruby] 语法
最新推荐文章于 2024-07-05 09:38:17 发布