Suppose I have a bunch of tables created with Text::Table. Does there exist a parser to convert them back to Perl data structures, or do I have to write my own?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems somewhat convoluted. If you had the information before converting it into a table, then why try to parse it from its presentation form? It’s like having a text file, converting it to latex, then to postscript, and then trying to get the text back from the postscript file.
I’m sure there’s a way to parse the output of Text::Table, but it seems that your workflow is flawed; I’d aim at using a simpler output for the data (besides Text::Table, if you really have to have it that way) like YAML that can then be trivially restored to the original data structure.