#!/perl/bin/perl -w use strict; use MIDI; for my $midi (@ARGV) { open(*STDOUT, ">", "$midi.pl"); print <<'EOP'; #!/usr/bin/perl -w use MIDI; my $opus = EOP my $opus = MIDI::Opus->new({ 'from_file' => $midi, 'no_parse' => 1 }); $opus->dump( { dump_tracks => 1 } ); print "\$opus->write_to_file('$midi');\n"; }