perl中heredoc使用說明
更新時間:2013年02月05日 13:56:09 作者:
在成塊打印文本的時候特別有用,需要的朋友可以參考下
格式
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)文章
Perl的Mail::POP3Client模塊和Gmail通信實例
這篇文章主要介紹了Perl的Mail::POP3Client模塊和Gmail通信實例,本文直接給出實現(xiàn)代碼,需要的朋友可以參考下2015-05-05