#!/usr/bin/perl use strict; use List::Util qw( min ); my @numbers; my %rec = ( 'add_loc' => { '4' => 'Store 1|100 Main Street|55.06', '3' => 'Store 2|210 East Main Street|0.00', '2' => 'Store 3|301 West Main Street|11.23' } ); for my $i (keys %rec) { for my $j ( values %{ $rec{$i} } ) { push( @numbers, (split( /\|/, $j))[-1] ); } } print min( @numbers );
In reply to Re: Get the Smallest Number
by bichonfrise74
in thread Get the Smallest Number
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |