Hi all, I want to write a script which should use extern programms for MRI-preprocessing, doing several processing commands to a bunch of data. For example: running brain extraction from the command line in linux I would write bet <inputimage> <nameforoutputimage> -m Then the programm bet in fsl would be opened and skull stripping would be performed, the output image would be saved in the same folder of the inputimage. In my script I want the outputimage to be saved in an other folder. Could anyone help me with this? I think there a lot of syntax errors ...

#!/usr/bin/perl use strict; use warnings; use diagnostics; my $dir = "usr/bin/Test_Protokoll" my $001= "prob_001"; my $002= "prob_002"; my $003= "prob_003"; @filter: ("001", "002", "003"); #Brainextraction foreach ("001", "002", "003") { system ("bet SYNT_MPRAGE_T1_PD_B0corr YNT_MPRAGE_T1_PD_B0corr_brain + -m"); }

In reply to 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.