Instead of adding the dots for empty lines when reading the input, and
adding the extra space when outputting, save the data as is and create
the correct format when outputting. This makes sure that multi-line-data
passed to -m is also represented correctly.
while(!eof(STDIN)) {
$line = <STDIN>;
last if $line eq ".\n";
- $line = ".\n" if $line eq "\n";
$fail_reason .= $line;
}
chomp( $fail_reason );
if (!defined($ui->{'User'}));
foreach $key (keys %{$ui}) {
my $val = $ui->{$key};
- chomp($val);
- $val =~ s/\n/\n /g;
+ $val =~ s/^/ /mg;
+ $val =~ s/^ $/ ./mg;
print F "$key: $val\n";
}
print F "\n";
foreach $key (keys %{$pkg}) {
my $val = $pkg->{$key};
chomp( $val );
- $val =~ s/\n/\n /g;
+ $val =~ s/^/ /mg;
+ $val =~ s/^ $/ ./mg;
print F "$key: $val\n";
}
print F "\n";