#!/usr/bin/perl -w

use strict;
use CGI qw(param);
use Data::Dumper;

my $FILE = "../logs/crash-reporter.log";

my @all;

open my $fh, $FILE or die $!;

until (eof $fh) {
    $CGI::Q = CGI->new(\*$fh);
    my %p;

    for (param) {
        my @p = param($_);
        $p{$_} = @p < 2 ? $p[0] : \@p;
    }

    push @all, \%p;
}
   
print Dumper \@all;