more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Waste of memory? Memory is there to be used ... what are you saving it for? Sure, for a long-lived application may want to be leery of using a large quantity of ram. But if it solves the immediate problem at hand, then using memory isn't really a problem. Also, memory is so large anymore that you need to work with *big* files if you're going to make memory usage a problem. The ordinary file isn't really going to be a problem. For example, here's a histogram of file sizes on a couple of my machines--my work laptop (LT0186) and my goofing off computer (Boink):
I wouldn't take a second thought about just loading a file under 500M into RAM, and as you can see, I have *very few* files larger than that. And for a simple task like the one presented, I'd probably go ahead and try it on larger files (swap space permitting) and go take a break. ...roboticus When your only tool is a hammer, all problems look like your thumb. In reply to Re^3: How to print the lines immediately above and below a matching line?
by roboticus
|
|