Perl and hosts file mapping question?
Posted
by user275633
on Stack Overflow
See other posts from Stack Overflow
or by user275633
Published on 2010-03-31T04:12:13Z
Indexed on
2010/03/31
4:23 UTC
Read the original article
Hit count: 202
perl
All,
I have a hosts file that looks like this:
10.10.10.1 myserver1 myserver1alias
10.10.10.2 myserver2 myserver2alias
I'm looking for a way using perl to pass in an argument of myserver1 and have it return myserver1alias, likewise if I pass in myserver2 it should return myserver2alias. Any suggestions?
© Stack Overflow or respective owner