hello trying to create a loop which will iterate through an array of .xml files to add subtitles to a clip with spumux..but not working. Here is code:

foreach my $i(0 .. $#subxmlfiles) { chdir('/users/dragonzero29/.wine/drive_c/mvtmp') or die "Could not cha +nge to dir...$!"; my @subxmllist=glob("@subxmlfiles"); system("spumux -s$i -m dvd -P \"/users/dragonzero29/.wine/drive_c/mvtm +p/$subxmllist[$i]\" < \"/users/dragonzero29/.wine/drive_c/mvtmp/$MM.M +PG\" > \"/users/dragonzero29/.wine/drive_c/mvtmp/.\" . ++$MM . \".MPG +\""); }

The array @subxmlfiles is created earlier in the script and if you're not familiar with spumux it takes an .xml file and uses it with an input clip to create subtitles and then outputs to your designated filename; if you have multiple .xml files (for multiple languages) then

each invokation of spumux MUST use the previous muxed clip to add to...I hope this makes sense. This is where I run into problems. the first clip (without subs) should be 0.MPG. This will be the input file and it will be used with the first .xml file in the array and the output file should a filename with $MM incremented by 1 which will be 1.MPG; 1.MPG will then be the input for the next iteration of the loop and so on and so forth so your expertise will be greatly appreciated :)


In reply to Spumux loop to add subs.. by armight29

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.