in reply to using variable inside system call

Your variable is not interpreted inside single quotes (').
Try this instead:
system ('wrunprb', '"*"', '"*"', '"*"', $node);

pelagic
-------------------------------------
I can resist anything but temptation.

Replies are listed 'Best First'.
Re: using variable inside system call
by Abigail-II (Bishop) on Apr 02, 2004 at 15:34 UTC
    The original poster has:
    system ('wrunprb "*" "*" "*" $[node]');
    Assuming the quotes gets fixed such that $node gets interpolated, that causes wrunprb to be called with three arguments (assuming $node doesn't contain whitespace), of which the first two are *. That's just an asteriks, nothing else. Your suggestion causes wrunprb to be called with three arguments (even if $node contains whitespace), of which the first two are "*", that is, including the quotes.

    Since we do not know what's inside $node (it may contain things which are special to the shell), suggesting it to replace it with something that bypasses the shell without pointing out this fact shouldn't be done. It's just not the same, even if it looks the same. Furthermore, even if $node doesn't contain anything that's special to the shell, your solution is still different.

    Abigail

      Yeah, got me Abigail!
      It's of course completely different.

      pelagic
      -------------------------------------
      I can resist anything but temptation.