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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |