Hiya,
Really ought to be able to figure this one out myself, but I'm a little stuck
I've got a perl script which automatically muxes all the AVI files in ints directory into MKV, which looks like this-
What I want to do is add a cleanup segment to the script, so that it removes all the starting AVI files when its done. My initial thoughts would be that I need to run the first segment of the script in a loop, before switching to the cleanup part, but I can't seem to get it so that it knows its finished properly.
Cheers
-Leezer-
Really ought to be able to figure this one out myself, but I'm a little stuck

I've got a perl script which automatically muxes all the AVI files in ints directory into MKV, which looks like this-
Code:
foreach (<*.avi>) {
$cmd = "mkvmerge $_ -o ";
s/\.avi$/.mkv/;
$cmd .= $_;
system($cmd);
}
What I want to do is add a cleanup segment to the script, so that it removes all the starting AVI files when its done. My initial thoughts would be that I need to run the first segment of the script in a loop, before switching to the cleanup part, but I can't seem to get it so that it knows its finished properly.
Cheers
-Leezer-