Help for this page

Select Code to Download


  1. 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
    
  2. 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
    
  3. or download this
    open HOSTS, "</etc/hosts"; # Or "<C:\\WINDOWS\\hosts";
    my %hosts = map{
    ...
      }
      map { $_ => $ip }, @hn;
    }<HOSTS>;
    
  4. or download this
    $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
    split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/