菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码:
点击运行
保存
#!/usr/bin/ruby -w # -*- coding : UTF-8 -*- print <<EOF 这是第一种方式创建here document 。 多行字符串。 EOF print <<"EOF"; # 与上面相同 这是第二种方式创建here document 。 多行字符串。 EOF print <<`EOC` # 执行命令 echo hi there echo lo there EOC print <<"foo", <<"bar" # 您可以把它们进行堆叠 I said foo. foo I said bar. bar
运行结果