or download this
#!/usr/bin/perl -w
use strict;
...
my %fields;
(%fields=ars_GetFieldTable($ctrl,$schema)) || die "Whoops: $ars_errstr
+"; #This gets the fields from the schema
print $_ . "\t\t:\t\t" . $fields{$_} . "\n" foreach sort keys (%fields
+);