Perl system call fails under windows 2003 server

Discussion in 'Perl Misc' started by rahulkats@gmail.com, Jun 14, 2007.

  1. Guest

    Hi,

    I'm having trouble with perl system call. The system call calls
    ntbackup.exe , the windows inbuilt utiility but the system errors out
    by saying cannot find ntbackup.exe even after giving the full path.
    I'm using windows 2003 server with Perl 5.8

    Any suggestions?

    Thanks
    , Jun 14, 2007
    #1
    1. Advertising

  2. Ian Wilson Guest

    wrote:
    > Hi,
    >
    > I'm having trouble with perl system call. The system call calls
    > ntbackup.exe , the windows inbuilt utiility but the system errors out
    > by saying cannot find ntbackup.exe even after giving the full path.
    > I'm using windows 2003 server with Perl 5.8
    >
    > Any suggestions?
    >


    This script works fine on my Windows XP PC:

    #!perl
    use strict;
    use warnings;
    my $args = 'ntbackup.exe';
    system ($args) == 0
    or die "system '$args' failed - $?";

    What happens if you cut & paste (do not retype) the above into notepad,
    save as tb.pl on your 2003 server and, from a command prompt type `perl
    tb.pl`?

    Cut & paste the script, the command line and any error message back into
    a posting here.

    Have you read `perldoc -f system`?
    Ian Wilson, Jun 15, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kieran Kelly
    Replies:
    3
    Views:
    837
    Shaji
    Sep 29, 2003
  2. Juan T. Llibre [MVP]
    Replies:
    4
    Views:
    2,976
    Patrick Olurotimi Ige
    Dec 9, 2004
  3. Mike
    Replies:
    6
    Views:
    193
  4. Richard
    Replies:
    4
    Views:
    147
    Richard
    Jan 25, 2007
  5. Hallvard ?strem

    Perl cgi on Windows 2003 Server fails

    Hallvard ?strem, Jun 9, 2004, in forum: Perl Misc
    Replies:
    8
    Views:
    199
    Hallvard ?strem
    Jun 16, 2004
Loading...

Share This Page