|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re^2: Strange system call failure in OS Xby afoken (Parson) |
| on Feb 16, 2013 at 17:15 UTC ( #1019047=note: print w/ replies, xml ) | Need Help?? |
|
eval { $result = qx(scutil --set LocalHostName $name) };
Read the "Safe Pipe Opens" section of perlipc for a secure replacement for `...`. The shell problem is also present in the single argument versions of system and exec, so make sure to use the multi-argument versions, which don't have this problem. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||