in reply to Re: using variable inside system call
in thread using variable inside system call

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

Replies are listed 'Best First'.
Re: Re: using variable inside system call
by pelagic (Priest) on Apr 02, 2004 at 23:58 UTC
    Yeah, got me Abigail!
    It's of course completely different.

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