in reply to Re: Perl array into MySQL Database
in thread Perl array into MySQL Database

column type should be varchar.

Yeah, thats what i currently do (join & split) but was curious if there was a "cleaner" way.

cheers.

Replies are listed 'Best First'.
Re^3: Perl array into MySQL Database
by knoebi (Friar) on Jul 21, 2004 at 11:43 UTC
    As you allready know, you have to serialise your array. You do it with split and join and i think there are cleaner ways.
    Split uses regex, which isn't pretty fast.

    You could use Storable which is pretty fast, but produces binary file or DataDumper which produces text files.

    This solutions are also more general then using split & join, they also work for hashes, references (at least Storable).

    ciao
    knoebi