Pearte has asked for the wisdom of the Perl Monks concerning the following question:

Is there a clean interface via Perl to /etc/hosts?

I've been trying to use Config::Hosts, but it seems a little rough / unreliable. Just wondered if there's a better / easier way ... ???

Bonus points if it works on WIN32 as well.

Shine On

Replies are listed 'Best First'.
Re: editting hosts file
by jwkrahn (Abbot) on Apr 26, 2012 at 22:24 UTC
    Is there a clean interface via Perl to /etc/hosts?

    gethostent

Re: editting hosts file
by Anonymous Monk on Apr 26, 2012 at 21:49 UTC
    C:\> notepad.exe c:\Windows\System32\Drivers\etc\hosts