my $i=0; my $temp = "ARR"; while (<FILE>) { if ($_ !~ /^\s+/) { chomp; $i++; @{$temp{$i}} = ($_); } else { my $temp2 = $_; chomp ($temp2); $temp2 =~ s/^\s+//g; push (@{$temp{$i}},$temp2); } } close (FILE); for $j(0..$i) { print "@{$temp{$j}}"."\n"; }
In reply to Re: Appending lines starting with white space to the previous line
by imrags
in thread Appending lines starting with white space to the previous line
by ashok13123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |