###########################
# ship3.pl
# 07.09.12
use strict;
use HTML::Template;
my(%t,@fld,$n);
my $template = HTML::Template->new(filename => 'centrifuge0.htm');
my @loop = ();
$t{htmfile} = 'centrifuge1.htm';
$t{flag} = 1;
open(IN,"centrifuge.txt") or die "Can't open the file centrifuge.txt";
while(<IN>){
next if $. == 1;
if ( !/^\t/ ) {
chop;
if ( $t{flag} == 1 ) {
push(@{ $t{N1s} },$_);
$t{flag} = 2;
} elsif ( $t{flag} == 2 ) {
push(@{ $t{C1s} },$_);
$t{flag} = 3;
} elsif ( $t{flag} == 3 ) {
push(@{ $t{E1s} },$_);
$t{flag} = 1;
}
}
}
close(IN);
for $n ( 0 .. $#{ $t{N1s} } ) {
$t{N0} = $n+1;
$t{N1} = $t{N1s}[$n];
$t{c1} = $t{C1s}[$n];
$t{e1} = $t{E1s}[$n];
my %row = (
N0 => $t{N0},
N1 => $t{N1},
C1 => $t{c1},
E1 => $t{e1}
);
push(@loop, \%row);
}
$template->param(std_loop => \@loop);
open(OUT,">$t{htmfile}");
print OUT $template->output;
close(OUT);
__END__;
舞钢市|
武威市|
定安县|
青海省|
香河县|
浮山县|
巩义市|
荔波县|
高雄市|
宜宾县|
沭阳县|
莲花县|
屯门区|
渝北区|
新巴尔虎右旗|
庄河市|
咸宁市|
馆陶县|
自贡市|
朝阳市|
马尔康县|
衡阳市|
三都|
黑山县|
云龙县|
南昌市|
二连浩特市|
西华县|
洱源县|
类乌齐县|
吉安县|
巫山县|
阿拉尔市|
会昌县|
饶平县|
弥勒县|
赞皇县|
铜陵市|
襄樊市|
佛冈县|
社旗县|