In my current project, it has some old code in PERL and new code in both PERL and PHP. The PHP and PERL code need connect each other, especially the session variables. Currently, we need PHP to get Perl session variables. Searching on google,
There are two good links about this topic:http://www.thesitewizard.com/archive/addcgitoapache.shtml http://www.thescripts.com/serveradministration/webservers/apache/virtual-hosting/app/Install_Apache_Web_Server_Perl_PHP_MySQL_on_Windows.htmlSteps:
use base 是物件導向編程時,用來描述“基類”的,其實說白了,use base somemodule;就相當於以下兩句的結合:BEGIN{ use somemodule (); push @ISA, qw(somemodule);}也可以同時 use base 兩個或者兩個以上的模組,例如:use base qw(Foo Bar);就相當於:BEGIN { use Foo (); use Bar (); push @ISA, qw(Foo Bar);}至於
if (open(MYFILE, "E:\\Perl\\Code\\string.pl")) { print("success open the file\n");#############################################output all of MYFILE's content 1############################################ print(<MYFILE>); print("=========1=
#!/usr/bin/perl -w use strict;use LWP;use HTTP::Request::Common qw(POST GET); use HTTP::Cookies;use LWP::UserAgent; use LWP::Simple; use URI::URL;my $ua = LWP::UserAgent-> new; $ua-> agent( "Mozilla 1.503 Windows XP
# Recently, I experienced Notes crash problems several times. # It wasted me a lot of time to terminate Notes completely and then restart it, # so I wrote this Perl script to save myself. Also hope it's helpful to you when you read these comments #
#!C:/perl64/bin/perl require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my ($url_new,$url_old) = @ARGV; my $response = $ua->get($url_new); die $response->status_line unless
9.1搜尋標量用index進行搜尋index string,substringindex string,substring,start_positionindex函數從string的左邊開始運行,並搜尋substring.返回找到substring所在的位置。0是指最左邊的字元,如果沒有找到substring,index便返回-1;如:index "Ring around the rosy","around"; #返回5 index("Pocket full of posies","ket")
在控制台輸入perldoc perldebug即可如何得到如何調試perl程式的文檔。其中重要的命令如下:p expr Same as "print {$DB::OUT} expr" in the current package. In particular, because this is just Perl's own "print" function, this means that nested data
一些常用模組的簡單描述 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