X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUtil.pm;h=0b3de9511e964f41c6834f025bcf4e60b1dc2f2d;hb=7af6a50c04cf10adb387b92dba43e51b78eb949c;hp=2e8a528475ba9bcc75517512d36d5dc94440b6f4;hpb=3b3b52396a19281c24481f0fcf7d216f426f94d9;p=spider.git 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;