1234 5 20021201 1 0
5678 0 20021202 0 0
0 0 0 10
9120 10 20021211 0 0
6543 5 20021202 0 0
0 0 0 5
0 0 0 5
####
#!/usr/bin/perl -w
use strict;
my @IDS;
while () {
my @sections = split("\t", $_);
my $id = $sections[0];
push @IDS, $id;
}
my $length = scalar(@IDS);
foreach (@IDS) {
for (my $i = 0; $i < $length; $i++) {
if ($IDS[$i] =~ m/^\s+/) {
$IDS[$i] = $IDS[$i-1];
}
}
}
# print scalar(@IDS);
print @IDS;
__END__
####
1234 5 20021201 1 0
5678 0 20021202 0 0
0 0 0 10
9120 10 20021211 0 0
6543 5 20021202 0 0
0 0 0 5
0 0 0 5