in reply to Re^2: system() behaviour within object(class) instance
in thread system() behaviour within object(class) instance

calling system inside or outside a method call can not affect is behaviour in any way.

Have you checked that you are calling the external program with the right arguments? try replacing the command by "echo" and see what is printed.

If everything else fails, try some process monitoring tool like (depending of your OS) truss, strace, ktrace, etc. (btw, make it monitor forked child processes).

Maybe the program you are calling is waiting for some input from stdin, maybe $param is undef...

  • Comment on Re^3: system() behaviour within object(class) instance

Replies are listed 'Best First'.
Re^4: system() behaviour within object(class) instance
by Robot (Novice) on Apr 24, 2005 at 17:50 UTC
    "calling system inside or outside a method call can not affect is behaviour in any way"
    Yes, that's why I am posting it here

    "Have you checked that you are calling the external program with the right arguments? try replacing the command by "echo" and see what is printed. "
    Of course, I did these multiple times. As I said it does work with & at the end.

    "Maybe the program you are calling is waiting for some input from stdin, maybe $param is undef... "
    Nope, it's all correct (no stdin input) otherwise it won't work with & also!


    10x for your attention :)