From 8cb21146557a468e517db3123d481e5715971c7a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 6 Nov 2002 22:52:57 +0000 Subject: - have "local *FILEHANDLE" before each "open FILEHANDLE, ..." - use some "cat_" and "output" where possible --- perl-install/commands.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/commands.pm') diff --git a/perl-install/commands.pm b/perl-install/commands.pm index 3808d6848..be82a2020 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -235,6 +235,7 @@ sub ps { require c; my $page = c::getpagesize() / 1024; + local *PS; open PS, ">&STDOUT"; format PS_TOP = PID RSS %CPU CMD @@ -426,7 +427,7 @@ sub route { my ($titles, @l) = cat_("/proc/net/route"); my @titles = split ' ', $titles; my %l; - open ROUTE, ">&STDOUT"; + open ROUTE, ">&STDOUT"; #-# ROUTE must be not be localised otherwise the "format ROUTE" fails format ROUTE_TOP = Destination Gateway Mask Iface . @@ -447,6 +448,7 @@ $l{Destination}, $l{Gateway}, $l{Mask}, $l{Iface} sub df { my ($h) = getopts(\@_, qw(h)); my ($dev, $size, $free, $used, $use, $mntpoint); + local *DF; open DF, ">&STDOUT"; format DF_TOP = Filesystem Size Used Avail Use Mounted on -- cgit v1.2.1