Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of ambs (3914)

Monday January 05, 2004
04:38 PM

What does $/ means at all?

[ #16651 ]

I need to process files. These files are big! The type of process cannot be done line by line. But it can be done using small chunks. Then, why not define $/ and read chunk at a time?

It seemed to be a good solution, but perl uses too many memory (although chunks are 300 bytes long).

An elegant solution which does not works... let think in another one...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • You are perhaps setting "$/ = 300;" when you should be setting $/ = \300;. With the former, "<>" thinks the string "300" is the line terminator (so you could get very large chunks). The latter reads 300 bytes at a time.