PrepAway - Latest Free Exam Questions & Answers

how can the output of the hostname command be assigned to a variable called myHostname?

Within a Perl script, how can the output of the hostname command be assigned to a variable
called myHostname?

PrepAway - Latest Free Exam Questions & Answers

A.
chopfmyHostname-‘hostname -s 2>/dev/null”)

B.
chop($myHostname=%hostname -s 2>/dev/nuir);

C.
$myHostname=7usr/bin/hostname”.

D.
chomp(@myHostname-hostname -s 2>/dev/null’);

Explanation:


Leave a Reply