scratchpad
bastard
the error with use strict is:
<p>
Can't use string ("0") as a HASH ref while "strict refs" in use at ./findgroups.pl line 37.
<p>
line 37 is marked with a >>>
<p>
below the code is what the output needs to look like
<p>
<code>
my $urlSet = $dbh->selectall_arrayref($statement);
my %groups = ();
foreach my $line (@$urlSet) {
my @grouplist = @$line;
my $group = $grouplist[0];
my $statement = qq!
SELECT fename,fetype FROM $table where symbol = '$group';
!;
my $grouped = $dbh->selectall_arrayref($statement);
my @groupedstreetsegments = @$grouped;
foreach my $g (@groupedstreetsegments) {
my $streetelement = @$g[0];
unless( exists ${$groups{$group}}{$streetelement} ) {
$groups{$group}{$streetelement} = 0;
}
$groups{$group}{$streetelement}++;
}
}
</code>
<p>
output
<p>
<code>
SYMBOL: 0
: 520
(Formerly I- 5): 4
1: 432
1 & 9: 92
1 and 9: 1
10: 8978
10 (Bus Rte): 9
100: 2
101: 2255
104: 91
105: 281
108: 103
10th: 35
11: 45
11 and 81: 10
110: 524
1100: 2
111: 2
111th: 1
113: 49
116: 17
117: 32
118: 278
</code>