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.system ('wrunprb "*" "*" "*" $[node]');
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
In reply to Re: using variable inside system call
by Abigail-II
in thread using variable inside system call
by natty_dread
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |