kcott's script is a good way to start this project.

So do I need the use  GetOptions::LONG at all?

I would encourage you to use it (note that it's Getopt::Long click to see examples of use) as it offers the best way of dealing with user-supplied parameters at runtime instead of hardcoding those in the script. It's even better than a configuration file read when your script starts because it can allow specifying both a configuration file and extra command-line options which can override options in the configuration file. E.g. myprog --config a/b/c  --iterations 100 --bin-dir /usr/bin/protokoll2. So, it will help you start this project from a solid foundation. I guess extract-brain needs a hell of parameter tweaking depending on protocol, resolution, quality. That's a good way to deal with that complexity. Next step would be to decide on a configuration-file format, plenty of options in Perl's CPAN repository of modules. Additionally, you may want to run your script with different configurations and parameters in parallel to assess their efficacy efficiently. Again, using configuration files and command-line parameters will help immensely.

Also, note that you can specify subs (functions) anywhere in your Perl script and not necessarily before calling them(re: I don't understand why I need the sub_ after I run the system?). I personally define all my subs at the end of a script, leaving the beginning for the "main" section.

bw, bliako


In reply to Re^3: Defining directory/Datas the perl script should work with by bliako
in thread Defining directory/Datas the perl script should work with by perlnewbie

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.