Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Storable and passed filehandles (ref to glob)

by blahblah (Friar)
on Aug 15, 2005 at 23:30 UTC ( [id://484024]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Storable and passed filehandles (ref to glob)
in thread Storable and passed filehandles

Doh. Sorry 'bout that. The error I'm getting is:

Magic number checking on storable file failed at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/fd_retrieve.al) line 341, at ./483993.pl line 16

using the second, much smaller code snippet I posted.

Replies are listed 'Best First'.
Re^5: Storable and passed filehandles (ref to glob)
by tye (Sage) on Aug 16, 2005 at 00:40 UTC

    Quoting the Storable docs:

    At the cost of a slight header overhead, you may store to an already opened file descriptor using the store_fd routine, and retrieve from a file via fd_retrieve.

    So you probably wrote that file with something other than store_fd and so it doesn't contain the "slight header overhead" that fd_retrieve is expecting.

    - tye        

      The giant.db is created by the sysopen. The only thing that ever writes to it is the store_fd.

      Thanks.

        Then you are trying to retrieve from an empty file, which fails so nothing ever gets stored to it.

        - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-03-28 11:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found