diff options
| author | David Leadbeater | 2015-01-10 17:50:12 +0000 |
|---|---|---|
| committer | David Leadbeater | 2015-01-10 17:50:12 +0000 |
| commit | 3350aef6b04f0d33ad52b41179c6742a98d2aa1f (patch) | |
| tree | 287ac1dba07509317309acab3161f5da286958e9 /scripts/hostname.pl | |
| parent | 1bae3cffef57d4d46d0230aa4f44cc52c7671b93 (diff) | |
| parent | 2d920d6f610e176bf121f9089f21956595df70e9 (diff) | |
| download | scripts.irssi.org-3350aef6b04f0d33ad52b41179c6742a98d2aa1f.tar.bz2 | |
Merge branch 'obfuscoder-perlcritic-e-l' into gh-pages
Diffstat (limited to 'scripts/hostname.pl')
| -rw-r--r-- | scripts/hostname.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/hostname.pl b/scripts/hostname.pl index 8871aea..2dc23bf 100644 --- a/scripts/hostname.pl +++ b/scripts/hostname.pl @@ -1,6 +1,8 @@ # $Id: hostname.pl,v 1.8 2002/07/04 13:18:02 jylefort Exp $ +use strict; use Irssi 20020121.2020 (); +use vars qw($VERSION %IRSSI); $VERSION = "1.01"; %IRSSI = ( authors => 'Jean-Yves Lefort', @@ -96,7 +98,6 @@ $VERSION = "1.01"; # # 2002-02-01 initial release -use strict; use Socket; use Socket6; @@ -116,7 +117,7 @@ sub hostname { sub get_addresses { Irssi::print("Resolving IP addresses..."); %addresses = (); - open(IFCONFIG, "ifconfig|"); + open(IFCONFIG, "-|", "ifconfig"); while (<IFCONFIG>) { $addresses{$2} = resolve($2) if (/(inet addr:|inet6 addr: |inet |inet6 )([0-9a-f.:]*)/ |
