Your increment of $MM applies to both values in the same command. Just use $i with a + 1 instead:
#!/usr/bin/env perl use strict; use warnings; for my $i (0 .. 9) { my $j = $i + 1; print "Input $i.mpg, output $j.mpg\n"; }
Having the chdir and the glob inside the loop is pointless as they don't appear to be changing. And please put that long path into a variable instead of repeating it four times - typos will not be kind to you otherwise. Since you've changed directory already you can probably just use relative paths anyway.
In reply to Re: Spumux loop to add subs..
by hippo
in thread Spumux loop to add subs..
by armight29
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |