in reply to how to read data for every 280 character ?
So what kind of data are you trying to read? (The 280 sounds very familiar to me.)
Like anonymous monk suggests open the file in binmode. In fact it doesn’t harm to always do this.
You could for example read the bytes (skipping the new lines) and count the number of bytes you have read. So you read byte for byte with a while loop and when you encounter a new line you use a next to continue with the next iteration.
HTH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to read data for every 280 character ?
by bh_perl (Monk) on Aug 18, 2008 at 07:59 UTC | |
by Anonymous Monk on Aug 18, 2008 at 08:10 UTC | |
by bh_perl (Monk) on Aug 19, 2008 at 01:50 UTC | |
by blazar (Canon) on Aug 19, 2008 at 11:06 UTC |