
这是更改系统变量的,如果改perl5的变量,则在perl脚本里面 使用 use lib "变量路径"
把脚本放到/usr/lib/cgi-bin/里面. 并且给执行权限.然后http://localhost/cgi-bin/test.pl
具体路径参数一下/etc/apache2/sites-enabled/里面的路径配置.
连到Unix系统后,输入命令 which perl ,然后回车。如果装了perl,就能知道在什么路径下安装的,如果显示找不到,就没装。
已经安装:
[host@host]~% which perl
/usr/bin/perl
[host@host]~%
未安装:
[host@host]~% which perl
perl not found
[host@host]~%
显示版本:
[host@host]~% perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
[host@host]~%
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)