1 package System::Introspector::Hosts;
6 my $fh = $self->_open_hosts_file;
8 while (defined( my $line = <$fh> )) {
10 next if $line =~ m{^\s*$}
12 push @hosts, [split m{\s+}, $line];
17 sub _open_hosts_file {
19 open my $fh, '<', '/etc/hosts'
20 or die "Unable to read /etc/hosts: $!\n";