#!/usr/bin/perl use warnings; use strict; my @results; while (@ARGV) { my $track = shift; my $name; if ($track =~ /^(\d+)[=:](.*)$/) { $track = $1; $name = $2; } while (@ARGV and $ARGV[0] !~ /^\d/) { $name .= shift; } $name .= ".wav"; my @cmd = (qw(cdparanoia), $track, $name); print join(" ",@cmd),"\n"; system(@cmd); push @results, sprintf "%-30s - %s (%d)\n", $name, ($? == 0 ? 'SUCCESS' : 'FAILURE'), $?; } print "\n\n"; print @results; #### $ ripcdaudio 1 song name 2 other song name 5 another song 8 lots of songs