首页 > 编程语言 > 详细

perl中heredoc使用说明

时间:2016-01-16 00:20:25      阅读:197      评论:0      收藏:0      [点我收藏+]

格式

print <<EOF
you text go here
EOF

复制代码 代码如下:

sub usage{
    print <<EOF;
Usage: test.pl -c config, -f file -l lines
    -c config file
    -f file name
    -l number of lines
EOF
}

NOTE: the last EOF must start at the beginning of the line!!!
you can use other words instead of EOF

perl中heredoc使用说明

原文:http://www.jb51.net/article/33815.htm

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!