




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
生物資訊程式語(yǔ)言應(yīng)用
Part3PerlLanguage
編輯ppt生物資訊程式語(yǔ)言應(yīng)用
Part3PerlLanguag1OutlineIntroduction.Installation.BackgroundknowledgeinPerl.Datatype.Controlstructure.Regularexpression.Overallpractice.編輯pptOutlineIntroduction.編輯ppt2IntroductionPerlisfreesoftware.LarryWall(Heisalinguist).ThehistoryofPerllanguage.1987-Perl1.0.1994-Perl5(containOOP).OOP(objectorientedprogramming)物件導(dǎo)向程式語(yǔ)言Perl5.8.0–supportunicode.2003–Perl6.Now.Characteristic.ThescriptlanguagebaseonClanguage(具跨平臺(tái)的特性).編輯pptIntroductionPerlisfreesoftw3InstallationPerlisthedefaultlanguageinanydistributionofLinux.PerlcanbeexecutedandworkedbytheActivePerlpackageinwindowsplatform./activeperl/
HowtoeditPerlprogram?Notepadinwindows,UltraEditandanytexteditor.編輯pptInstallationPerlisthedefa4Installationcont.Practice.DownloadActivePerlsoftwarefile.InstallActivePerl.編輯pptInstallationcont.Practice.編輯p5BackgroundknowledgeDatatypeinPerl.ControlstructureinPerl.RegularexpressioninPerl.編輯pptBackgroundknowledgeDatatype6DatatypeinPerlLikeEnglishScalar(純量變數(shù))–比喻單件事物.數(shù)字常數(shù)$x=5;字串常數(shù)$y=“Hello”;ThespecialexpressionofPerl.Print“Hello”.”World”;(HelloWorld).Print“Hello”*2;(HelloHello).字串與數(shù)字間的轉(zhuǎn)換$x=123;$y=“456”;Print$x+$y;(數(shù)字)Print$x.$y;
(字串)編輯pptDatatypeinPerlLikeEnglish編7DatatypeinPerlcont.Practice.Usingscalar.Specialexpression.字串與數(shù)字間的轉(zhuǎn)換.編輯pptDatatypeinPerlcont.Practic8DatatypeinPerlcont.Array(陣列).ThedefinitionofArrayinPerl.@student=("9154610","9154611",”9154612”);my@student;$student[0]="9154610“;$student[1]=“9154611“;$student[2]=“9154611”;Array單數(shù)的取用.print$student[0],"\n";print"$student[1]\n";print$student[2]."\n";Array複數(shù)的取用.print@student,“\n”;(全部一起print出來(lái))以單數(shù)取用方式print出複數(shù)資料(incontrolstructurechapter).編輯pptDatatypeinPerlcont.Array(9DatatypeinPerlcont.Practice.Usingarray(definition).單數(shù)取用.複數(shù)取用.編輯pptDatatypeinPerlcont.Practic10DatatypeinPerlcont.Hash(雜湊).$純量=單一=單數(shù)@陣列=串列=複數(shù)%雜湊=串列=複數(shù)定義陣列=類(lèi)似ip@student=("9154610","9154611",”9154612”);定義雜湊=類(lèi)似dns%students=("Peter"=>"9154610","Mary"=>"9154611","Cathy"=>"9154612");
編輯pptDatatypeinPerlcont.Hash(雜11DatatypeinPerlcont.Hash(雜湊).定義雜湊=類(lèi)似dns%students=("Peter"=>"9154610","Mary"=>"9154611","Cathy"=>"9154612");Hash單數(shù)的取用.print$students{"Peter"},"\n";print$students{"Mary"},"\n";print$students{"Cathy"},"\n";Hash複數(shù)的取用.print%students,"\n";以單數(shù)取用方式print出複數(shù)資料(incontrolstructurechapter).
編輯pptDatatypeinPerlcont.Hash(雜12DatatypeinPerlcont.Practice.Usinghash(definition).單數(shù)取用.複數(shù)取用.編輯pptDatatypeinPerlcont.Practic13ControlstructureinPerlIfstatement(陳述式).Forloop(迴圏).Foreachloop(迴圏).Whileloop(迴圏).編輯pptControlstructureinPerlIfst14ControlstructureinPerlcont.If條件判斷If條件成立則執(zhí)行若If條件不成立則執(zhí)行(elsestatement可有可無(wú))Ifstatement(陳述式).編輯pptControlstructureinPerlcont15ControlstructureinPerlcont.Practice.Ifstatement.If-elsestatement.編輯pptControlstructureinPerlcont16ControlstructureinPerlcont.Forloop(迴圏).$#array:取得array的大小$i++:等同於$i=$i+1;$sum+=$i:等同於$sum=$sum+$i;編輯pptControlstructureinPerlcont17ControlstructureinPerlcont.Practice.Forloop迴圏.以array單數(shù)取用方式print出array複數(shù)資料.以hash單數(shù)取用方式print出hash複數(shù)資料.編輯pptControlstructureinPerlcont18ControlstructureinPerlcont.Foreachloop(迴圏).Likeforloop.ForloopForeachloop編輯pptControlstructureinPerlcont19ControlstructureinPerlcont.Practice.Foreachloop(迴圏).以array單數(shù)取用方式print出array複數(shù)資料.以hash單數(shù)取用方式print出hash複數(shù)資料.編輯pptControlstructureinPerlcont20ControlstructureinPerlcont.Whileloop(迴圏).While判斷式編輯pptControlstructureinPerlcont21ControlstructureinPerlcont.Practice.Whileloop(迴圏).1+2+…+100.編輯pptControlstructureinPerlcont22RegularexpressioninPerl樣式(pattern)的表達(dá).繫結(jié)符號(hào)=~.=~可用來(lái)將右邊的樣式比對(duì)左邊的字串純量,成功傳回1,失敗傳回0.表否定則可改用!~通常搭配判斷式使用.編輯pptRegularexpressioninPerl樣式(23RegularexpressioninPerlcont.比對(duì).$`:代表字串中比對(duì)成功之前的部分.$&:代表字串中比對(duì)成功的部分.$‘:代表字串中比對(duì)成功之後的部分.編輯pptRegularexpressioninPerlcon24RegularexpressioninPerlcont.字元取代.$var=~tr/xxx/yyy/把變數(shù)$var內(nèi)的xxx字元都逐一代換成yyy字元字串取代.$var=~s/xxx/y
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年專(zhuān)利權(quán)質(zhì)押合同登記程序
- 企業(yè)法律顧問(wèn)合同(2025年版)
- 2025年審計(jì)鑒定合同
- 五年級(jí)上冊(cè)數(shù)學(xué)教案-總復(fù)習(xí) 第2課時(shí) 圖形與幾何|北師大版
- 二年級(jí)上冊(cè)數(shù)學(xué)教案-用厘米做單位量長(zhǎng)度 (7)-西師大版
- 專(zhuān)題一第2課三、《便攜移動(dòng)設(shè)備》教學(xué)設(shè)計(jì) 2023-2024學(xué)年青島版(2018)初中信息技術(shù)七年級(jí)上冊(cè)
- 2025年黑龍江省綏化市單招職業(yè)傾向性測(cè)試題庫(kù)含答案
- 2025年湖南司法警官職業(yè)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試題庫(kù)必考題
- 2025年吉林省遼源市單招職業(yè)適應(yīng)性測(cè)試題庫(kù)附答案
- 2025年黑龍江護(hù)理高等專(zhuān)科學(xué)校單招職業(yè)傾向性測(cè)試題庫(kù)匯編
- 按鍵精靈腳本編寫(xiě)方法
- 節(jié)約集約建設(shè)用地標(biāo)準(zhǔn) DG-TJ08-2422-2023
- 建筑工程項(xiàng)目合作備忘錄
- 竹簽購(gòu)銷(xiāo)合同范例
- 物聯(lián)網(wǎng)工程導(dǎo)論
- 學(xué)校安全干事述職
- JJF(京) 68-2021 電能表現(xiàn)場(chǎng)校驗(yàn)標(biāo)準(zhǔn)裝置校準(zhǔn)規(guī)范
- 《汽車(chē)保險(xiǎn)與理賠》-教學(xué)設(shè)計(jì)
- 2024至2030年中國(guó)礦用隔爆型監(jiān)控?cái)z像儀行業(yè)投資前景及策略咨詢(xún)研究報(bào)告
- 大學(xué)生職業(yè)素養(yǎng)訓(xùn)練(第六版)課件 第二單元學(xué)習(xí)職業(yè)禮儀
- 路橋工程檢測(cè)技術(shù) 課件 1公路工程試驗(yàn)檢測(cè)管理
評(píng)論
0/150
提交評(píng)論