Time of Update: 2014-07-23
標籤:style http for re 問題 c Win8.1(專業版)下執行Perl(版本5.18.2)的PPM工具提示:C:\Users\寧>ppmppm gui failed: DBI connect(‘dbname=C:\Users\寧\AppData\
Time of Update: 2015-04-24
標籤:perl 用法 變數類型 Perl的變數類型及用法Variable types and their uses| Type | Sigil | Example | Is a&nb
Time of Update: 2015-04-03
標籤:轉自:superdebug.blog.chinaunix.net替換將所有C程式中的foo替換成bar,舊檔案備份成.bakperl -p -i.bak -e ‘s/\bfoo\b/bar/g‘ *.c很強大的功能,特別是在大程式中做重構。記得只有在UltraEdit用過。 如果你不想備份,就直接寫成 perl -p -i -e 或者更簡單 perl -pie, 恩,pie這個單詞不錯將每個檔案中出現的數值都加一perl -i.bak -pe ‘s/(\d+)/ 1 + $1 /ge‘
Time of Update: 2015-03-16
標籤:[root@localhost mha4mysql-node-0.52]# perl Makefile.PL;make;make install Can‘t locate ExtUtils/MakeMaker.pm in @INC (@INC contains: inc /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /
Time of Update: 2015-01-11
標籤:Perl的here文檔機制是從UNIX shell中的here文檔機制派生而來的。和在shell中一樣,Perl中的here文檔也是面向行的參考資料表單,要求提供<<運算子,其後跟隨一個初始的終止字串。<<之後可以不出現空格。如果終止字串沒有加上引號或雙引號,則允許執行Variant 運算式。如果終止字串上加了單引號,則不執行Variant
Time of Update: 2014-12-27
標籤:Arguments are the values you pass to a Perl script. Each value on the command line after the name of the script will be assigned to the special variables$ARGV[0],$ARGV[1],$ARGV[2], and so on. The number of arguments passed to the script is stored
Time of Update: 2014-12-26
標籤: 程式指令碼在運行過程中,總會碰到這樣那樣的問題,我們會預知一些問題並為其準備好處理代碼,而有一些不能預知。好的程式要能儘可能多的處理可能出現的異常問題,本文就總結了一些方法來解決這些異常,當然perl在這個處理了不及其它同類語言,但也不會差到那裡。在開始前,我們先盤點一些關於perl的優缺點。0. 曆史太悠久了。你可以在1997年的電腦上找到perl5.0。(只是吐槽一下,曆史悠久沒什麼不好,與時俱進才是關鍵)1.
Time of Update: 2014-12-04
標籤:des http 使用 sp 檔案 資料 bs linux tt 1.Unix系統的維護功能
Time of Update: 2014-11-29
標籤:blog io ar sp for on 2014 log bs #!/usr/bin/env perluse warnings;use strict;use
Time of Update: 2014-10-13
標籤:style http color os 使用 ar strong 檔案 資料 一、Regex特殊變數: 1、$n :包含上次模式比對的第n個子串 2、$&
Time of Update: 2014-09-19
標籤:blog os ar for div sp log c amp perl中,chdir函數用來改變當前的工作目錄到指定目錄,如果沒有指定目錄,則到使用者的主目錄。這個函數的調用是相當於Un
Time of Update: 2014-08-22
標籤:perl1、智能匹配操作符替代綁定操作符:在雜湊中尋找某一個鍵:比較兩個數組是否完全相同:尋找列表中是否存在某個元素:智能匹配操作符與順序無關,~~ 左右元素可以互換2、智能操作符優先順序3、given語句相當於c語言的switch語句4、given可以測試多個條件,在default前用break,否則會導致default一直執行5、笨拙匹配(Regex方式)6、多重專案的when匹配可以在語句中間加上其他語句:
Time of Update: 2014-08-20
標籤:style blog http os 檔案 2014 cti log 1、改變目錄chdir "/etc" or die "can‘t chdir to
Time of Update: 2014-08-09
標籤:perl path hash 1、雜湊的鍵是唯一的,值可以重複!2、訪問雜湊元素$hashname{“$key”};#雜湊為大括弧,數組為方括弧,鍵為字串$family_name{"fred"} = "firstd";#給雜湊元素賦值3、雜湊鍵支援任意運算式$foo =
Time of Update: 2014-07-24
標籤:使用 c 字串 doc 指令碼 pat #判斷一個變數是否匹配一個Null 字元串,m!pattern! 與 m/pattern/if($str =~ m!^\s*$!)如果僅僅判斷字串為空白,可以使用if($str eq "")#
Time of Update: 2014-07-16
標籤:style color 使用 strong os art 我們在linux常常用到一個程式需要加入參數,現在瞭解一下perl中的有關控制參數的函數.getopt.在linux有的參數有二種形式.一種是--help,另一種是-h.也就是-和--的分別。--表示完整參數.-表示簡化參數.在pe
Time of Update: 2014-07-13
標籤:cgi c tomcat privileged executable 基於Tomcat7.0版本配置CGI開發環境,步聚如下:以我的Tomcat7安裝目錄為例:TOMCA_HOME
Time of Update: 2018-12-08
在Linux或者Unix上操作(產生)Excel,CPAN上提供了Spreadsheet::WriteExcel 和 Spreadsheet::ParseExcel這兩個模組。 下面就來看看 Spreadsheet::WriteExcel 和 Spreadsheet::ParseExcel的使用方法。 首先,要在伺服器上安裝相應的模組。 安裝 Excel 模組的 PPM 命令 複製代碼 代碼如下:ppm> install OLE::Storage_Lite ppm> install
Time of Update: 2018-12-08
NULL值的判斷 $t{type1id} = $$pref{dbh}->selectrow_array("SELECT type1id FROM enq1 WHERE id = 3"); if ( $t{type1id} == 0 ) { print "Type1id is NULL\n"; } ==>不是數值項的話,這個語句有問題。數值項專用。 if ( length($t{type1id}) == 0 ) { print "Type1id is NULL\n"; } ==>
Time of Update: 2015-01-07
How to generate exe for your PERL script?,generateperlThe way I am using is PAR Packer. 1. Downloadmodule PAR Packer: http://search.cpan.org/~rschupp/PAR-Packer-1.024/lib/PAR/Packer.pm2.