You may use any of the known serializers, e.g. JSON::XS or Storable.
Storable
is better if you want to retrieve references as references, not as copies of values. Then save a serialized object in the field of any type (VARCHAR, BLOB, ...) that satisfy storage requirements.
use Storable qw(nfreeze thaw);
use DBI;
# ... connect to database
# Store
my $data = [ [$a, $b, $c ], [ $a, $b, $c ] ];
my $bytestream = nfreeze $data;
$dbh->do('insert into table (field) values(?)', undef, $bytestream);
# Retrieve
$bytestream = $dbh->selectrow_array('select field from table where ...');
$data = thaw $bytestream;
Additionally, you can compress $bytestream
, for example, via IO::Compress::Gzip
my $bytestream = gzip nfreeze $data;