Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Regex to remove data

by rjt (Deacon)
on Nov 06, 2012 at 17:19 UTC ( #1002533=note: print w/replies, xml ) Need Help??


in reply to Re: Regex to remove data
in thread Regex to remove data

This is good, but the OP did say he wanted to remove the lines from a "large file", but your approach reads the entire file into an in-memory array (@lines) and processes that.

Check out my reply below for an example that loads only one line into memory at a time (the -n switch assumes while (<>)).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002533]
help
Chatterbox?
[stevieb]: ++ atcroft
[atcroft]: .oO(Then there is the effect if a site changes their timezone, such as when the International Date Line was moved by the purchase of Alaska by the US from Russia in 1867, or several places (I cannot recall off-hand) that moved from one side of the Date

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2017-04-29 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.