burgerc has asked for the wisdom of the Perl Monks concerning the following question:
How would I sort the @statements array? I would like to sort it on the $entry{statement_date}.my @statements = (); for (@{ $data->{'mail-item'} }) { my %entry; $entry{job} = $_->{'mail-jobnum'}; $entry{product} = $_->{'mail-prodnum'}; $entry{statement_date} = $_->{'mail-statement-date'}; push(@statements, {%entry}); }
The ultimate goal here is to display all statements in date orderd.
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting an Array
by toolic (Bishop) on Jul 31, 2014 at 13:48 UTC | |
|
Re: Sorting an Array
by McA (Priest) on Jul 31, 2014 at 13:52 UTC | |
|
Re: Sorting an Array
by choroba (Cardinal) on Jul 31, 2014 at 17:12 UTC | |
|
Re: Sorting an Array
by burgerc (Novice) on Jul 31, 2014 at 18:27 UTC | |
by AppleFritter (Vicar) on Jul 31, 2014 at 18:35 UTC | |
|
Re: Sorting an Array
by burgerc (Novice) on Jul 31, 2014 at 16:19 UTC | |
by Cristoforo (Curate) on Jul 31, 2014 at 16:43 UTC | |
by AppleFritter (Vicar) on Jul 31, 2014 at 17:04 UTC | |
by choroba (Cardinal) on Jul 31, 2014 at 17:22 UTC |