вторник, 14 июня 2011 г.

Unobvious perl

system("hash svn") and system("hash svn >/dev/null") return different values, because hash is shell built-in function and
If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system's command shell for parsing (this is /bin/sh -c on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to execvp , which is more efficient.
 Perldoc system

Комментариев нет:

Отправить комментарий