#!/usr/bin/perl # # Syntax: create-report.pl < infile.rtf > outfile.grd # # Then edit outfile.grd and change table name/connection name # (and add connections/parameters if needed) # $FIELD_ENCLOSURE='::'; my %fields; while (<>) { while (/${FIELD_ENCLOSURE}([A-Za-z0-9_]+)${FIELD_ENCLOSURE}/gm) { $fields{lc($1)} = 1; } } print "\n"; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; print "
\n"; print " \n"; foreach $key (sort keys %fields) { print " \n"; } print " \n"; print "
\n"; print "
\n"; print "
\n";