Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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
Domain Nodelet?
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 wandering the Monastery: (2)
As of 2023-02-05 23:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (33 votes). Check out past polls.

    Notices?