19 $dir = "sections/" . substr("0$section", -2);
21 write_file("$dir/name", $_);
22 print "created section $section ($dir) - $_\n";
26 die "query before first section header"
30 my $filename = $dir . "/" . substr("0$query", -2) . ".cql";
31 write_file($filename, $_);
32 print " added query $query ($filename) - $_\n";
36 my($name, $contents) = @_;
38 my $fh = new IO::File(">$name")
39 or die "can't create '$name': $!";
40 $fh->print($contents);