perl中heredoc使用說明
更新時(shí)間:2013年02月05日 13:56:09 作者:
在成塊打印文本的時(shí)候特別有用,需要的朋友可以參考下
格式
print <<EOF
you text go here
EOF
復(fù)制代碼 代碼如下:
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
相關(guān)文章
有關(guān)perl正則表達(dá)式的一些雜項(xiàng)
有關(guān)perl正則表達(dá)式的一些雜項(xiàng),有需要的朋友可以參考下2013-02-02Perl的Mail::POP3Client模塊和Gmail通信實(shí)例
這篇文章主要介紹了Perl的Mail::POP3Client模塊和Gmail通信實(shí)例,本文直接給出實(shí)現(xiàn)代碼,需要的朋友可以參考下2015-05-05