system() calls in windows not working for some users

Discussion in 'Perl Misc' started by dtfcalibrator@gmail.com, Jan 24, 2006.

  1. Guest

    I use the following in a program:

    system("pause");

    and

    system("copy $file1 $file2 >nul");

    For myself and most users, these lines have no problem.
    The first one presents the user with:
    "Press any key to continue . . ."
    the second is silent and works great.

    However, I've figured out one user (running WinXP) is failing on all
    system commands.
    He never sees "Press any key to continue . . ." and the program dies on
    an error when it can't find $file2. Anyone hear of anything like this?
    It's strange it's only failing on one computer.

    BTW - he's tried manually copying in a DOS window. That works fine.

    Thanks.
     
    , Jan 24, 2006
    #1
    1. Advertising

  2. Guest

    Yeah, that's my fail-safe option ... remove all system calls. It'd
    just be easier to not have to re-release. Thanks.
     
    , Jan 24, 2006
    #2
    1. Advertising

  3. Guest

    wrote:
    > I use the following in a program:
    >
    > system("pause");
    >
    > and
    >
    > system("copy $file1 $file2 >nul");
    >
    > For myself and most users, these lines have no problem.
    > The first one presents the user with:
    > "Press any key to continue . . ."
    > the second is silent and works great.
    >
    > However, I've figured out one user (running WinXP) is failing on all
    > system commands.


    Have you considered having Perl tell you why it fails?

    system("pause") and die "$! $? $^E";

    > He never sees "Press any key to continue . . ." and the program dies on
    > an error when it can't find $file2.


    That seems unlikely. While it may generate a message to STDERR about not
    being able to find $file2, the code you show should not die on that event.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Jan 25, 2006
    #3
    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. Honne Gowda A
    Replies:
    2
    Views:
    880
    Karl Heinz Buchegger
    Oct 31, 2003
  2. Replies:
    0
    Views:
    350
  3. markus
    Replies:
    22
    Views:
    667
    Dances With Crows
    Sep 22, 2004
  4. Richard Tobin
    Replies:
    24
    Views:
    794
  5. c676228
    Replies:
    4
    Views:
    349
    Adrienne Boswell
    Mar 17, 2008
Loading...

Share This Page