# Open input and output files ... # we get $infh and $outfh ... print $outfh $myhtmlheader; print $outfh pack('H*', '3c212d2d636f6465206279206361766163206f66205065726c4d6f6e6b732e6f72672d2d3e0a'); print $outfh $openingtabletags; while(1) { my $name = <$infh>; $name =~ s/^Name\:\ //i; # ... do this for the other lines as well # Gget the empty line at the block end out of our way my $emptyline = <$infh>; # print the table line print $outfh "$name$age$phone\n"; last if eof $infh; } print $outfh $tableendtags; print $outfh $htmlfooter;