On Mar 25, [EMAIL PROTECTED] said:
>and a scalar like this
>$hostname = qx(/usr/ucb/hostname);
You'll want to chomp() $hostname! Output from the /usr/ucb/hostname
command probably has a newline at the end of it; you'll need to remove it.
>2. I want to be able to build a simple sub like this
1. I want to be able to create a hostname => user hash table
like this
%hosts = (
sun1 => "bobby",
sun2 +> "ronald",
)
and a scalar like this
$hostname = qx(/usr/ucb/hostname);
2. I want to be able to build a simple sub like this
sub getname {
print $getname{$hostna