###########################
# ship3.pl
# 07.09.12
use strict;
use HTML::Template;
my(%t,@fld,$n);
my $template = HTML::Template->new(filename => 'ship30.htm');
my @loop = ();
$t{htmfile} = 'ship3.htm';
$t{flag} = 1;
open(IN,"ship3.txt") or die "Can't open the file ship3.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__;
イムナマリ|
ヘハ「ヌ|
ノウフヌ|
ヘシニャ|
ヅフマリ|
ロキノニマリ|
ツウヌマリ|
ヘチトャフリラニ|
ウハケアマリ|
フィトマハミ|
ソヒタュツメタハミ|
テヨタユマリ|
クセノハミ|
ウ猴ョハミ|
メ贄ハミ|
ー「ーヘクツニ|
ケ羲モマリ|
マ賣カマリ|
ネトコモマリ|
ユナアアマリ|
オ貎ュマリ|
ウ、タヨハミ|
アエィマリ|
ソヒノスマリ|
セクーイマリ|
チ靫ニマリ|
テワヤニマリ|
キサヒマリ|
スュエマリ|
ヤエマリ|
ホホレヨ鯑ツヌ゚ニ|
盖皺マリ|
コ鮗ハミ|
ムーホレマリ|
タウポハミ|
ココエィハミ|
メチエコハミ|
ヘミソヒムキマリ|
ムーオ|
モタオヌマリ|
ホ菻マリ|