Any cross-platform function to obtain the machine name?

I

Ilias Lazaridis

looking for something like

use system;

print system->machineName();

this should work across platforms.

I was not able to locate something.

..
 
I

Ilias Lazaridis

use Sys::Hostname;
print hostname;

My apologies.

I've searched for "machinename" instead of "hostname".

Is the term "host" generally prefered within the perl domain?

I've currently choosen "Machine" as the term in my project.

Any rationales to change this to "Host"?

..
 
P

Paul Lalli

My apologies.

none needed. You made the effort to search, you just didn't know what
search terms to use.
I've searched for "machinename" instead of "hostname".

Is the term "host" generally prefered within the perl domain?

Probably, but only because Perl is based on Unix, and in unix there is
a utility called `hostname`, which returns the name of the machine.

Paul Lalli
 
I

Ilias Lazaridis

none needed. You made the effort to search, you just didn't know what
search terms to use.



Probably, but only because Perl is based on Unix, and in unix there is
a utility called `hostname`, which returns the name of the machine.

I think i've solved my confusion about the term "host".

The term "hostname" means basicly "The name of the machine which hosts
the unix operating system", thus "host" referes to "operating-system-
host".

Is this correct?

..
 
J

Joe Smith

P

Peter J. Holzer

I think i've solved my confusion about the term "host".

The term "hostname" means basicly "The name of the machine which hosts
the unix operating system", thus "host" referes to "operating-system-
host".

The name "host" for a computer was well established before unix was
invented. RFC 1 (April 1969) has the title "Host software". I'm not sure
where the term came from, but since "hosts" always were relatively large
multi-user systems I suspect that a computer needs to host users to be
called a host.

hp
 
I

Ilias Lazaridis

The name "host" for a computer was well established before unix was
invented. RFC 1 (April 1969) has the title "Host software". I'm not sure

http://tools.ietf.org/html/rfc1

nice to read such a nearly 4 decades old document!
where the term came from, but since "hosts" always were relatively large
multi-user systems I suspect that a computer needs to host users to be
called a host.

I think I stay for now with the term "Machine".

..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top