看板 [ Perl ]
討論串[問題] 關於搜尋字串
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓3(3推 0噓 2→)留言5則,0人參與, 最新作者liyih時間14年前 (2010/11/08 11:46), 編輯資訊
0
0
0
內容預覽:
請記得開啟. use strict;. use warnings;. my $pattern = undef;. if ("test_string" =~ m/$pattern/) {. print "match\n";. }. Use of uninitialized value $pattern
(還有156個字)

推噓1(1推 0噓 12→)留言13則,0人參與, 最新作者n1lk5g2 (不決定習慣自由)時間14年前 (2010/11/06 17:25), 編輯資訊
0
0
0
內容預覽:
下面是我自己寫的一個程式. my $input = shift;. my $string = "你好嗎";. if ($string =~ /$input/) {. print "有在其中\n";. }else{. print "沒有\n";. }. 但遇到一個小bug. 就是如果輸入的是空格 依然
首頁
上一頁
1
下一頁
尾頁