#! /usr/bin/perl -w use strict; my $count = shift; $count ||= 10; $count = 99 if $count > 99; my $parent = "b00"; my @kids = map { sprintf "b%02d", $_ } 1 .. 100; foreach my $t (@kids, $parent) { print "DROP TABLE IF EXISTS $t;\n"; } print <