PerlSufi has asked for the wisdom of the Perl Monks concerning the following question:
Any insight is greatly appreciated.use strict; use warnings; use List::Util qw(min); use Data::Dumper; my $products_and_prices; my $sellable_products = [ { one => 1, two => 2, }, ]; for my $prod ( @{$sellable_products} ) { push @{$products_and_prices}, { $prod->name => $prod->price, }; } my $lowest = min values $products_and_prices; print Dumper($lowest);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sort and Access Array of Hash
by AppleFritter (Vicar) on Aug 15, 2014 at 18:10 UTC | |
|
Re: Sort and Access Math::Currency Objects
by kennethk (Abbot) on Aug 15, 2014 at 16:07 UTC | |
by PerlSufi (Friar) on Aug 15, 2014 at 16:10 UTC | |
by kennethk (Abbot) on Aug 15, 2014 at 16:15 UTC | |
by PerlSufi (Friar) on Aug 15, 2014 at 16:32 UTC | |
|
Re: Sort and Access Array of Hash
by Anonymous Monk on Aug 17, 2014 at 12:13 UTC |