Scripting >> Perl >>  How to capture the output of Operating System (OS) command to a variable

$hostname = `uname -n`;
print $hostname;