Time of Update: 2017-02-28
cgi|perl|server|web|程式 DNS伺服器既可以是主控伺服器也可以是次要伺服器。主控伺服器也稱為主伺服器,是判定網域名稱的最終來源。主控伺服器同時也是傳送到次要伺服器的區傳送(zone transfer)的源頭。次要伺服器接收所有來自主控伺服器的區資訊。一個常見的錯誤是試圖改變二級伺服器上的區資料庫檔案而沒有改變主控伺服器上的區資料庫檔案(zone
Time of Update: 2018-07-20
使用了兩個不同的函數,在執行效率上checkmd5sum.pl 比checkmd5sum_find.pl要更快。 1.checkmd5sum.pl #!/usr/bin/perl # # File: checkmd5sum.pl # Author: amxku.net # Date: 2008-12- ...兩個使用了不同的函數,在執行效率上checkmd5sum.pl 比checkmd5sum_find.pl要更快。1.checkmd5sum.pl
Time of Update: 2018-07-25
use base 是物件導向編程時,用來描述“基類”的,其實說白了,use base somemodule;就相當於以下兩句的結合:BEGIN{ use somemodule (); push @ISA, qw(somemodule);}也可以同時 use base 兩個或者兩個以上的模組,例如:use base qw(Foo Bar);就相當於:BEGIN { use Foo (); &
Time of Update: 2017-01-18
1. 用grep函數 函數名 grep 調用文法 @foundlist = grep (pattern, @searchlist); 解說 與同名的UNIX尋找工具類似,grep函數在列表中抽取與指定模式比對的元素,參數pattern為欲尋找的模式,傳回值是匹配元素的列表。 例子 @list = ("This", "is", "a", "test"); @foundlist = grep(/^[tT]/, @list); 結果 @foundlist = ("This", "test"); 2.
Time of Update: 2015-01-05
標籤:前言在Perl 中, 不安裝其他模組的狀況下, 可以使用 localtime 來擷取當地日期和時間。在標量上下文中, 返回的是字串格式。my $localtime = localtime();print "\n$localtime\n";返回:Thu Jan 1 18:17:56 2015在列表上下文中, 返回的是描述目前時間的一個元素列表my ($sec,$min,$hour,$mday,$mon,$year_off,$wday,$yday,$isdat)
Time of Update: 2015-01-04
標籤:perl lwp yaml cpan yum安裝CPAN以及YAML相關的軟體包:yum install cpan perl-YAML*更新cpan到最新版並重新載入cpan:[[email protected] ~]# cpan Ente
Time of Update: 2014-12-07
標籤:perl shell 1)perl是非常靈活的,聽到有人說,看perl代碼最不爽的一點就是:一個判斷條件可放在一個語句後面,例如:my $value = "value" if
Time of Update: 2014-09-19
標籤:blog ar div sp log c ef size 管理 基本用法 #初始化%h為空白數組 %h={}; #用數組初始化%h為a=>1,b=>2
Time of Update: 2014-09-17
標籤:blog http io os 使用 ar for 檔案 資料
Time of Update: 2014-09-15
標籤:blog io os 使用 java ar for 資料 div Perl“膠水”,能夠將各種應用程式或者各種語言的代碼結合起來。Perl可以編寫普通的指令碼程式,
Time of Update: 2014-09-10
標籤:des style blog io os ar for art div This is notes from reading the "object oriented perl
Time of Update: 2014-08-26
標籤:os 使用 檔案 ar 2014 line sp new on #!/usr/bin/perl# file : DATA.pl# author : darkstar# date
Time of Update: 2018-12-05
1. 題目2. 代碼與輸出 ch6-family-name.pl 1 #-----------------------------------------------------------# 2 # Source: Learning Perl, chapter6, exercise-1 3 # Date: 2012-01-16 4 # Author: xiaodongrush 5 #---------------------------------------------------
Time of Update: 2018-12-03
Here I'll summarize three ways to open a temporary file using Perl. The first way is to create the new object via module IO::File to get a read/write file handle as below. my $temp_fh = IO::File->new_tmpfile;Perl closes these files when
Time of Update: 2014-07-24
標籤:使用 檔案 資料 c ar 資料庫 # 使perl程式支援utf8寬字元編碼,不添加下面幾行列印中文字元時將出現Wide character in print警告或錯誤。use utf8;binmode(STDIN, ‘:encoding(utf8)‘);binmode(STDOUT, ‘
Time of Update: 2018-12-05
Introduction:Continuing with my backup articles (part two of my Amanda series coming soon...), I thought I would tell you about how I do my remote backups. The program I use is rdiff-backup, with a perl script to sort out e-mail notification and
Time of Update: 2018-12-04
wxPerl是一個純oo的gui庫。今天在看它的例子的時候,也試了一下不同的繼承方法。在wxPerl的hello.pl中是這樣用的:use vars qw(@ISA);@ISA = qw(Wx::App);在programming Perl裡查了一下use vars這個pragma. 發現,這種用法已經在某種程度上廢棄了,因為有了our. 上面的代碼等同於:our (@ISA) = qw(Wx::App);他們的作用都是定義一個包全域變數。
Time of Update: 2018-12-04
#!/usr/bin/perl# un-mangle c++ symbol# assuming the c++filt command is availableuse strict;use warnings;if ($#ARGV != 0) { print "usage:\n"; print "program filename\n";}my $in_filename = $ARGV[0]; open(my $in, "<", $in_filename) or die "Can'
Time of Update: 2018-12-08
方法一(不使用模組,by agonyr)複製代碼 代碼如下:#!/usr/bin/perl -wuse strict;my @seq = ( "A", "T", "C", "G" );my $length = 10000;undef my %hash;$hash{"A"} = int( $length * 0.3 );$hash{"C"} = int( $length * 0.3 );$hash{"G"} = int( $length * 0.2 );$hash{"T"} = int(
Time of Update: 2018-12-08
該模組用perl的數組代表一個檔案,檔案的每一行對應數組的一個元素,第一行為元素0,第二回為1,... 檔案本身實際並不載入到記憶體,對數組元素的操作立刻作用到檔案裡。最大的方便是可以任意指定處理開頭結尾的某幾行。基本用法:複製代碼 代碼如下:use Tie::File;tie @array, 'Tie::File', filename or die ...;$array[13] = 'blah'; # line 13 of the file is now 'blah'print