http://qs1969.pair.com?node_id=109910


in reply to Re: Perl embedded in Kornshell
in thread Perl embedded in Kornshell

The example was awk, not perl. I have since converted the awk to perl, but I am getting a syntax message I am stuck on. Something about a right bracket missing, even though all my brackets match/balance. The chunk of code shown is just part of a much, much larger interactive script written in kornshell with some embedded awk. In this (sub)procedure, I had to actually "cut" the input file down to run through the awk code shown in order for it to process it because awk was telling me the record length as too long. Subsequently, I had to run the output of the awk procedure through a 'grep' to put the records selected back together again. The file is about 5000 records, and each record is a little over 7000 bytes long. The grep was taking forever when the range passed to the awk procedure was long. So, I am trying to convert the awk to perl to overcome the record length problem, and get rid of the 'grep' to speed up the process. The process writes out selected records from the iput file, based on whether an identifier is within the range passed on the first record as a set of 'parms'. I am not a perl programmer (yet!) so if you care to help me out, I will be glad to e-mail you the code snippet, since I do ot know how to format code in this site's text boxes. Thanks again, Jim