hi sushil --   
 
so you need to determine fixed field column positions in a file that uses a  
space as the 
field delimiter, and has text string data fields with leading,  embedded and 
trailing spaces, 
and has no string quoting mechanism?   wow.   
 
 
attached is some code that may address your problem -- at least in  part.   
 
the approach i have come up with is certainly  not perfect.   it is 
susceptible to false-positive 
detection of fields.   if you know that all your files always  have a certain 
number of fields, 
this may be fairly easy to defend against.   
 
the code also depends on my assumption that empty fields are not truncated  
from the 
end of a record.   for instance, if line 6 of example file 1 were  just 
``ABC_707 0903'', my 
method would fail, although this failure also would be defensible  if you 
were expecting a 
known number of fields to be seen.   
 
further comments and discussion are contained in the attached  file.   
 
please feel free to contact me if you have any questions.   
 
hth -- bill walters   
 



************************************** Get a sneak peek of the all-new AOL at 
http://discover.aol.com/memed/aolcom30tour

Attachment: a15_2.pl
Description: Binary data

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to