my $device = shift;
my $trackcount = shift;
my $single_file = shift;
+ my @output;
$device ||= '/dev/cdrom';
+ if ($single_file) {
+ @output = ("1-$trackcount", 'wav');
+ } else {
+ @output = ('-B');
+ }
- exec('cdparanoia', '-d', $device,
- (($single_file and ("1-$trackcount", 'wav')) or ('-B')));
- # exec prints its own error message so just
+ exec('cdparanoia', '-d', $device, @output);
die;
}