#!/usr/bin/perl -w

use strict;

my $id = "AA";
my $ix = 1;
#open(FH, ">", "Music.ly") or die("Cannot open music.ly");

for ($ix = 1; $ix <= 39; $id++, $ix++) {
  next if ($ix < 30);
  if ($ix < 10) { $ix += 0; $ix = "0$ix"; }
  my $cmd;

#  $cmd = "mv Music.$ix.ly tt; sed '2s/^\\\\//;' < tt > Music.$ix.ly";
#  print $cmd, "\n"; system $cmd;

  $cmd = "cat Y.ly | sed \"s/ZZZ/$id/g; s/XXX/$ix/g;\" > Music.$ix.ly";
  print $cmd, "\n"; system $cmd;

#  $cmd = "cat Z.ly | sed \"s/ZZZ/$id/g; s/XXX/$ix/g;\" > Score.$ix.ly";
#  print $cmd, "\n"; system $cmd;

#  print FH "\\include \"Music.$ix.ly\"\n";

}


__END__
my @roman = qw( I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII XVIII XIX XX XXI XXII XXIII XXIV XXV XXVI XXVII XXVIII XXIX XXX XXXII XXXII XXXIII XXXIV XXXV );


while (1) {
  print " $ix";
  $ix++;
}
