my %hosts = map{ split /\s+/, $_, 2 }; # Or substitute your favourite filehandle here. __DATA__ host1 1.1.1.1 host2 1.2.3.5 #### # IP Masq gateway: 192.168.0.80 pedestrian # Primary desktop: 192.168.0.82 raptor1 # Family PC upstairs: 192.168.0.84 trex tyrannosaur family # Domain servers: 205.212.123.10 dns1 brutus 208.140.2.15 dns2 156.63.130.100 dns3 cherokee #### open HOSTS, " $ip }, @hn; }; #### $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/