The whole thing below is the line, its just word wrapped in scrt. I can't concatenate it because everything is in a specific position for what I need. Is the seek module what I need to be using? I just need to collect the two characters in position 70 and 71, test if they are GE,E$,E0,etc.. If they are then I need the data from position 92 and write the line to a file that consists of positions 70-71 and position 92, then go on to the next line.
Tim -----Original Message----- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 12:49 PM To: Tim Wolak; beginners@perl.org Cc: Wagner, David --- Senior Programmer Analyst --- WGO Subject: RE: line position So what makes up a line? CME through the next CME? You can concatenate all the data together if desired( do a chomp first) and check if CME or What denotes the next rcd? Then you could either do a equal(ie, if ( next rcd ) { if ( substr($MyData,70,2) eq q[xx] ) { # now pull what I need, place in another file or print } $MyData = q[]; # clear the buffer and get ready for next data } If you have any problems or questions, please let me know. Thanks. Wags ;) David R Wagner Senior Programmer Analyst FedEx Freight 1.408.323.4225x2224 TEL 1.408.323.4449 FAX http://fedex.com/us -----Original Message----- From: Tim Wolak [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 10:30 To: Wagner, David --- Senior Programmer Analyst --- WGO; beginners@perl.org Subject: RE: line position Here is an example of the lines I am reading in below. This is one continuous line. I need information from positions 70-71, if they match what I want then print that and position 92(also sub-positions C,P,D). Being that I have never had to do this before I'm not sure what to use to step me through this file to get the information that I need. Tim CME008885071BIOH72006102816122900MO0000002006091415300020070316083000BQB IOH7 FE 00000000000000005000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000 000011 000000000000000000 000000000000000000USD0000100000000 0001000000000500USD 000000000000000000 00100100 200610271000000000000008258000000000000000860800000000000000079080 BQF60000 000000010000000037501605F 000000000000000000 000000000000000000 F 0000000000000002400 1BQ 101100 00 000000000050200703BIO 000000000000000001020000000000000005002000000000000000001E00000000000000 00000000000 -----Original Message----- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 12:16 PM To: Tim Wolak; beginners@perl.org Subject: RE: line position If you provide some data and/or what you have attempted, it will go much farther in getting some assistance. Otherwise the list is guessing at what you are really trying to do. If you have any problems or questions, please let me know. Thanks. Wags ;) David R Wagner Senior Programmer Analyst FedEx Freight 1.408.323.4225x2224 TEL 1.408.323.4449 FAX http://fedex.com/us -----Original Message----- From: Tim Wolak [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 09:38 To: beginners@perl.org Subject: line position All, I need to parse lines from a file and at a certain position test to see if it is what a want, if so I need to grab information from other positions in the line and drop it into a file. As I have never done this before, can someone point me in the right direction as to get started? Thanks for the help! Tim ********************************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ********************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>