From 7af6a50c04cf10adb387b92dba43e51b78eb949c Mon Sep 17 00:00:00 2001 From: minima Date: Fri, 23 Mar 2001 00:38:50 +0000 Subject: [PATCH] find problem in split in print_all_fields --- perl/DXUtil.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 2e8a5284..0b3de951 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -183,12 +183,13 @@ sub print_all_fields my ($priv, $ans) = promptf($ref->field_prompt($field), $ref->{$field}); my @tmp; if (length $ans > 79) { - my ($p, $a) = split /: /, $ans; + my ($p, $a) = split /: /, $ans, 2; my $l = (length $p) + 2; my $al = 79 - $l; + my $bit; while (length $a > $al ) { - $a =~ s/^(.{$al})//; - push @tmp, "$p: $1"; + ($bit, $a) = unpack "A$al A*", $a; + push @tmp, "$p: $bit"; $p = ' ' x ($l - 2); } push @tmp, "$p: $a" if length $a; -- 2.43.0