Since you haven't provided any code, I can't either. Read up on 'split' though, that should help quite a bit.
-------------------------- David Olbersen iGuard Engineer 11415 West Bernardo Court San Diego, CA 92127 1-858-676-2277 x2152 > -----Original Message----- > From: Gorden-Ozgul, Patricia E [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 11, 2003 2:11 PM > To: '[EMAIL PROTECTED]' > Subject: PipeDelimited Input / Three File Output (Positional > Characters) > > > I have need to process a file from the following eight(8) column, > pipe-delimited format: > > pos1 2 3 4 5 6 > 7 > 8 > > 12345a|a1b2c5d6efg|2c3v4|abcd432|69836|zbn8734abc|893hgj747|bvc098n| > 12345678|abcdefg|12345|abcdefghijklmno||123456789|abc|123| > ... > > Each column is reference numerically by position. > Each column may or may not contain text data variable in length. > Each input record will contain eight(8) pipe delimited fields. > > The data is to be processed to produce three(3) output files, > each formatted > positionally as follows: > > file 1: first 20 chars(fill w/pos4 truncated to 20 chars); > second 15 chars > blank fill; third 20 chars blank fill; fourth 10 chars(fill > w/pos2 truncated > to 10 chars). File 1 will contain four(4) fields per record > each 65 chars > in length. > > file 2: first 10 chars(fill w/pos8 truncated to 10 chars); > second 10 chars > blank fill; third 20 chars blank fill; fourth 20 chars(fill > w/pos3 truncated > to 10 chars). File 2 will contain four(4) fields per record > each 60 chars > in length. > > file 3: first 20 chars(fill w/pos4 truncated to 20 chars); > second 15 chars > blank fill; third 20 chars blank fill; fourth 10 chars(fill > w/pos2 truncated > to 10 chars); fifth 15 chars(fill w/pos1 truncated to 15 chars if > necessary). File 3 will contain five(5) fields per record > each 80 chars in > length. > > Each column's value will be left-justified and truncated if > necessary in the > output files. > > Is this doable in perl? If so, how would I code it? Syntax please. > Thank you. > > Pat Gorden-Ozgul > [EMAIL PROTECTED] > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]