[Israel.pm] tie

Shlomo Yona shlomo at cs.haifa.ac.il
Tue Jun 15 07:17:43 PDT 2004


I have a list of lists (LoL), which is a list of binary


I'd like to have this list of vectos tied to a file.
That's easy:

	tie @list_of_vectors, 'Tie::File', $vectors_list_filename;

BUT -- the vectors themselves must now be represented as
strings... and I cannot look up in them, I cannot do
operations on them unless I split the "line" before usage
and then join the "vector" back to a "line" after doing my

I wonder if there's a way to allow a LoL to be tied nicely
to a file, so that the usage is just like using a LoL but in
fact the data is tied to a file, rather than being all in


To make things more complicated: What if I wanted to have
the vectors be sparse-vectors, but still keep the simple LoL
usage instead of all the extra hassle which is now required
to handle the tied list and the sparse vector.....?

Are there ready made solutions for this? How?

Shlomo Yona
shlomo at cs.haifa.ac.il

More information about the Perl mailing list