亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2290 | 回復(fù): 3
打印 上一主題 下一主題

here document 相關(guān)資料 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2007-09-04 21:44 |只看該作者 |倒序?yàn)g覽
###鏈接http://perldoc.perl.org/perlop.html
<<EOF
A line-oriented form of quoting is based on the shell "here-document" syntax. Following a << you specify a string to terminate the quoted material, and all lines following the current line down to the terminating string are the value of the item. The terminating string may be either an identifier (a word), or some quoted text. If quoted, the type of quotes you use determines the treatment of the text, just as in regular quoting. An unquoted identifier works like double quotes. There must be no space between the << and the identifier, unless the identifier is quoted. (If you put a space it will be treated as a null identifier, which is valid, and matches the first empty line.) The terminating string must appear by itself (unquoted and with no surrounding whitespace) on the terminating line.

       print <<EOF;
    The price is $Price.
    EOF       print << "EOF"; # same as above
    The price is $Price.
    EOF       print << `EOC`; # execute commands
    echo hi there
    echo lo there
    EOC       print <<"foo", <<"bar"; # you can stack them
    I said foo.
    foo
    I said bar.
    bar       myfunc(<< "THIS", 23, <<'THAT');
    Here's a line
    or two.
    THIS
    and here's another.
    THATJust don't forget that you have to put a semicolon on the end to finish the statement, as Perl doesn't know you're not going to try to do this:

       print <<ABC
    179231
    ABC
       + 20;If you want your here-docs to be indented with the rest of the code, you'll need to remove leading whitespace from each line manually:

    ($quote = <<'FINIS') =~ s/^\s+//gm;
       The Road goes ever on and on,
       down from the door where it began.
    FINISIf you use a here-doc within a delimited construct, such as in s///eg, the quoted material must come on the lines following the final delimiter. So instead of

    s/this/<<E . 'that'
        the other
        E
          . 'more '/eg;you have to write

    s/this/<<E . 'that'
          . 'more '/eg;
    the other
    E

[ 本帖最后由 zhangkeyijian 于 2007-9-5 13:31 編輯 ]

論壇徽章:
1
2015年辭舊歲徽章
日期:2015-03-03 16:54:15
2 [報(bào)告]
發(fā)表于 2007-09-05 08:57 |只看該作者
不明白你有什么問題。

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2007-09-05 13:04 |只看該作者
here document的語法錯(cuò)了:
print <<END_OF_DATA

...................

END_OF_DATA

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2007-09-05 13:27 |只看該作者
對(duì)不起,打擾大家了。
問題得到解決,由于自己沒有仔細(xì)檢查。
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP