一些常用模組的簡單描述 http://www.perldoc.com/perl5.6/pod/perlmodlib.html在perl 中使用模組: 模組的:http://www.cpan.org/modules/01modules.index.html 安裝模組: 1. perl Makefile.PL 2. make 3. make test 4. make install 也可以用如下命令安裝模組(已知的適用的系統redhat 9.0,其他的我不知道,請大家試試看 。 perl
原文發表在網易部落格 2010-11-06 13:07:36 第1題和第2題#!perl -w #chapter 4 , exercise one and two use strict; sub total{ my $sum; foreach $_ (@_){ $sum += $_; } $sum; } my @fred=(1,3,5,7,9); print "
REST::Neo4p – PERL版本的”OGM” | Neo4j中文站 – 世界領先的圖資料庫--> REST::Neo4p – PERL版本的”OGM”發表於 2012 年 10 月 21 日 由 neo4jThis is a guest post by Mark A. Jensen, a DC area bioinformatics scientist. Thanks a lot Mark for writing the
Perl支援把你的pod格式文字塊產生文檔,這個pod格式文字塊可以是植入在代碼裡的標記語言,也可以是單獨的一個檔案。有了pod,只要在寫指令碼的時候,隨手記下想法、說明,就不用再另外編寫文檔了,非常方便。建議先仔細讀一讀perldoc perlpod裡面的內容,文檔詳細介紹了pod標記語言的文法。$ perldoc perlpod盡量保證一個比較好的書寫習慣,例如:=pod=head1 NAMEWater::Test – The great new Water::Test!=head1
fcntl FILEHANDLE,FUNCTION,SCALARImplements the fcntl(2) function. You'll probably have to say use Fcntl;first to get the correct constant definitions. Argument processing and value returned work just like ioctlbelow. For example:use
1.perl中~~為智能匹配,它可以智能地根據符號兩側的運算元來確定操作。如要判斷某個元素是否存在於數組中,不使用智能匹配,程式像這樣:my $x=2;my @array=(1,2,3);my $flag=0;for (@array){if($x==$_){$flag=1;}}if($flag == 1){print "$x is in the array";}else{print "$x is not in the