[PerlChina] 请教perl cgi页面如何显示ls信息

gary.jsz gary.jsz at gmail.com
Wed Jun 4 20:11:09 PDT 2008


 我的代码如下:
#!/usr/bin/perl -w
#
use strict;
use utf8;
#use CGI qw/:standard/;
use CGI qw/:all/;
print header,
        start_html("Mailing list manager system page"),
        h1('Maillist管理系统 '),
        start_form,
        "What are you doing?",
        popup_menu(-name=>'choose',
                   -values=>[qw(select create delete modify)]),p,
        submit,
        end_form,
        hr;
if(param()){
        if (em(param('choose')) =~ /select/){
                system "date";
                print `ls -l \$HOME`;
#system "ls -l \$HOME"
        }
        if (em(param('choose')) =~ /create/){
                system "date -u";

        }
}

其中时间能正确显示,但是,就是不能打印 ls -l $HOME 这行,换成 system "ls -l \$HOME"也不能打印,还希望各位老师能指教,谢谢!




Gary.jsz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/china-pm/attachments/20080605/c3200526/attachment-0001.html 


More information about the China-pm mailing list