From 7e5672eb837597a08dc886dc022f704be9b97665 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 24 Jul 2001 10:23:21 +0000 Subject: generalize the use of chomp_ as the functional alternative to chomp (and works on lists) --- perl-install/any.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'perl-install/any.pm') diff --git a/perl-install/any.pm b/perl-install/any.pm index 793017880..444fed381 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -319,8 +319,7 @@ sub partitions_suggestions { my @etc_pass_fields = qw(name pw uid gid realname home shell); sub unpack_passwd { my ($l) = @_; - chomp $l; - my %l; @l{@etc_pass_fields} = split ':', $l; + my %l; @l{@etc_pass_fields} = split ':', chomp_($l); \%l; } sub pack_passwd { @@ -373,7 +372,7 @@ sub writeandclean_ldsoconf { sub shells { my ($prefix) = @_; - grep { -x "$prefix$_" } map { chomp; $_ } cat_("$prefix/etc/shells"); + grep { -x "$prefix$_" } chomp_(cat_("$prefix/etc/shells")); } sub inspect { -- cgit v1.2.1