- or download this
my %hosts = map{
split /\s+/, $_, 2
}<DATA>; # Or substitute your favourite filehandle here.
__DATA__
host1 1.1.1.1
host2 1.2.3.5
- or download this
# IP Masq gateway:
192.168.0.80 pedestrian
...
205.212.123.10 dns1 brutus
208.140.2.15 dns2
156.63.130.100 dns3 cherokee
- or download this
open HOSTS, "</etc/hosts"; # Or "<C:\\WINDOWS\\hosts";
my %hosts = map{
...
}
map { $_ => $ip }, @hn;
}<HOSTS>;
- or download this
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/