Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Index a file with pack for fast access

by BrowserUk (Patriarch)
on Dec 16, 2011 at 19:52 UTC ( [id://944006]=note: print w/replies, xml ) Need Help??


in reply to Index a file with pack for fast access

open(INDEX, "+>$file.idx") or die "Can't open $file.idx for read/write: $!\n";</c>

If you are using Windows -- and it will do no harm even if you are not-- one thing you should be doing is binmodeing your index file.

pack 'N' can produce values containing bytes that look like various control characters -- \r, \n, ^Z etc. -- that will cause Windows to do nasty things to your index file unless you tell it that the file will contain binary data.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

  • Comment on Re: Index a file with pack for fast access

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://944006]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-18 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found