PerlDiscuss - Perl Newsgroups and mailing lists <[EMAIL PROTECTED]>
wrote:
: 
: Hi,
: I'm new to Perl and I'm trying to excute/call a perl program from
: Perl Script in an ASP page. I've loaded ActivePerl v5.6 on my
: Microsoft Win2000 webserver and I can execute lots of Perl code
: in my ASP pages with no problem, but I need to call an external
: program and don't know the correct systax.
: 
: In my ASP page:
: -----------------------------------------------------
: <%@ LANGUAGE = PerlScript%>
: $Response->write("Pete Was Here <br>"); #Works Fine
: 
: system("MakeFile.pl"); #Doesn't execute the script
: -----------------------------------------------------

    Your current working directory is probably not where you think
it is. Try using the full path name. But first, see if you get an
error message ($!) from this:


<%@ Language="PerlScript" %>

<%
    use strict;
    use warnings;
    our( $Response );

    my $exit_status = system_call_test( 'MakeFile.pl' ) / 256;

    sub system_call_test {
        my $call    = shift;
        $Response->Write( "Executing this: '$call'<br><br>" );

        my $status  = system( $call );
        $Response->Write( "'system' returned: '$!'<br>" );

        return $status;
    }
%>

HTH,

Charles K. Clarkson
-- 
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to