<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">


<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=027012911-12082003><FONT size=2>Hi everyone - hope someone 
will&nbsp;help a newbie</FONT></SPAN></DIV>
<DIV><SPAN class=027012911-12082003><FONT size=2>I need to&nbsp;simulate 
the&nbsp;importing of a flat file into two tables in a db for test purposes. The 
file has very long records, which aren't separated into fields by any character. 
Rather, the program under test counts characters. So chars 1-8 go in table 1, 
chars 9-12 to table 2, chars 13-40 to table&nbsp;1 again and so on. I want to 
use a perl script as the records are very long (+/- 88 fields) to create two new 
text files and sort the records between the two files&nbsp;as I specify. The 
problem, I am faced with, however, is the counting and sorting of the chars. I 
don't have a clue.&nbsp;This is as far as I got:</FONT></SPAN></DIV>
<DIV><SPAN class=027012911-12082003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=027012911-12082003><FONT size=2>#!/usr/bin/perl<BR>open (FILE, 
"testfile") || die "Can't open file !\n";<BR>@file = 
&lt;FILE&gt;;<BR>my($record) = split(/\n/, @file);<BR>foreach $record 
(@file)<BR>{<BR>&nbsp; my($char) = split(//, $record);<BR>&nbsp; <BR>}<BR>close 
FILE;</FONT></SPAN></DIV>
<DIV><SPAN class=027012911-12082003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=027012911-12082003></SPAN><FONT size=2>Kind Regards<BR>Walter 
Kruse</FONT> <BR><U><B><FONT color=#0000ff size=2>MultiChoice Information 
Technology</FONT></B></U> <BR><B><FONT color=#008000 size=2>Software test 
analyst</FONT><FONT color=#000000 size=2> - Application Delivery and Support 
Team</FONT></B> <BR><B><FONT color=#0000ff 
size=2>Tel:<I>&nbsp;&nbsp;&nbsp;</I></FONT></B><I> <FONT color=#0000ff 
size=2>+27 (0) 11 289-4552</FONT><B></B></I> <BR><B><FONT color=#0000ff 
size=2>Cell:</FONT><I>&nbsp;&nbsp;</I></B><I> <FONT color=#0000ff size=2>+27 (0) 
82 660 7288</FONT></I> <BR><B><FONT color=#0000ff 
size=2>Email:&nbsp;</FONT></B><B><U></U></B><U> <FONT color=#0000ff 
size=2>walterk@multichoice.co.za</FONT></U> <BR><B><FONT color=#0000ff 
size=2>Personal web page:</FONT></B><B><U></U></B><U> <FONT color=#0000ff 
size=2><A href="http://www.ou-ryperd.net/" 
target=_blank>http://www.ou-ryperd.net</A></FONT></U> </DIV>
<DIV>&nbsp;</DIV>
<DIV>*********************************************************************************************************************<BR>Everything 
in this e-mail and attachments relating to the official business of 
MultiChoice&nbsp;Africa is proprietary to the company. Any view or opinion 
expressed in this message may be the view of the individual and should not 
automatically be ascribed to the company.&nbsp; If you are not the intended 
recipient, you may not peruse, use, disseminate, distribute or copy this 
message. If you have received this message in error, please notify the sender 
immediately by email, facsimile or telephone and destroy the original 
message.<BR>*********************************************************************************************************************</DIV>
</BODY></HTML>