#!/data/local/bin/perl -w use strict; my ($infile) = $ARGV[0]; open(IN, $infile); while () { (my $slide,my $text) = split(/\#/,$_); (my $num,$text) = split(/\-/,$text,2); my $number = int $num; if ($number > 9) { open(OUT, ">note0$number.html"); } else { open(OUT, ">note00$number.html"); } print OUT " $text "; close(OUT); }