in reply to Bad file descriptor when using backticks?
If I'm doing quick and dirty scrips then I just shell using backticks and don't worry much about the commands not running. If I start to worry about errors then it's time to find a way to do it using perl calls. For your sample in this instance Sys::Hostname is available as a core module and has fallback and error reporting.
<slings-and-arrrows-off>Actually, as a confession, if the problem is going to need a large proportion of shell builtins then I just code in Bash.<slings-and-arrows-on> <\p>
|
|---|