in reply to Writing Arrays to disk

Check out the Storable module. You can do something like:
use Storable; # store the links array in links.db store(\@links, "links.db"); # load the links array from links.db @links = @{ retieve("links.db") };

-sam

Replies are listed 'Best First'.
Re: Re: Writing Arrays to disk
by shaolin_gungfu (Novice) on Apr 16, 2002 at 23:34 UTC

    yeah thanks i've tried the Storable thing, it sounds like just what I need but I just get the message:

    Storable object version 1.012 does not match $Storable::VERSION 1.014 at C:/Perl/lib/DynaLoader.pm line 225.
    Compilation failed in require at storable line 1.
    BEGIN failed--compilation aborted at storable.pl line 1.

    I'm using Activestate Perl and their ppm thing isn't working at the moment so I can't even try reinstalling the module:-( ah well maybe i'll just keep on opening and closing the filehandles in a textfile instead, thanks Tom