go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The example was awk, not perl. A friend here at the Monestary has since converted the awk to perl for me, but I am getting a syntax message I am stuck on. Something about a right bracket missing, even though all my brackets match/balance. For some reason I could not get 'a2p' to work at all on my machine. The command exists on my machine, but I could not get it to work. Admittedly, I am not sure of the syntax, and I have no explicit documentation on a2p installed either.
Here's why I am trying to convert the awk to perl: 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, Edit by tye In reply to Re: Re: Perl embedded in Kornshell
by JALandry
|
|