while(my $hash = $q->fetchrow_hashref()) { | while(my $hash = $q->fetchrow_hashref()) { | ||||
my $clean = { }; | my $clean = { }; | ||||
foreach my $name ( keys %{$hash} ) { | foreach my $name ( keys %{$hash} ) { | ||||
if ( $name =~ /^pages\.(.*)/ ) { | |||||
if ( $name =~ /^p\.(.*)/ ) { | |||||
my $newname = $1; | my $newname = $1; | ||||
$clean->{$newname} = $hash->{$name}; | $clean->{$newname} = $hash->{$name}; | ||||
} | } |