... By structure of data I mean which variable is in which place and its name/type.

Maybe specify a template similar in spirit to Perl's pack, e.g. something like

"a,a,c,i,a,c,..." # to be used in: my ($foo, $bar, $baz, ...) = unpack_line("a,a,c,i,a,c,...", $line) +; # or my $parser = My::Module->new( template => "a,a,c,i,a,c,..." ); my ($foo, $bar, $baz, ...) = $parser->read_line();

(where a / c / i would stand for categorical / continuous / identifier, etc.)

Or together with names:

"foo:a, bar:c, baz:i, ..." my %fields = unpack_line("foo:a, bar:c, baz:i, ...", $line);

Of course, there are many other ways to approach this, so possibly ask your potential users what interface or mini template language they would prefer...


In reply to Re: A generic biomedical data processing library by almut
in thread A generic biomedical data processing library by spiros

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.