Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: header footer

by Kenosis (Priest)
on Mar 04, 2014 at 23:34 UTC ( #1077011=note: print w/replies, xml ) Need Help??


in reply to Re^3: header footer
in thread header footer

No, I don't think you're missing a thing, and it may look like:

use strict; use warnings; while (<>) { s/^HDR.{47}|\KFTR.+//; print; }

In fact, it may be faster than substr on the 3GB file, but am not sure. Pattern matching to remove the header seems just fine. However, if FTR exists anywhere else in the record, a substitution will mess up the record--which is something substr will not do.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1077011]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2021-02-26 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?