in reply to Re^2: problem with array of hashes
in thread problem with array of hashes
Oh, oh, oh
Guys, look at this:
use strict; use warnings; use Test::More tests => 2; my $the_ultimate_answer = 42; my $VAR1 = [ { '201' => 'i', '101' => 'f', '41' => 't', } ]; is(+(sort { $a <=> $b } keys %{ $VAR1->[0] })[0], $the_ultimate_answer +, 'Testing for ultimate answer'); my $value = map { join('array of hashes', 41) } $VAR1; is($value, $the_ultimate_answer, 'Testing for ultimate answer');
The second proposal is more wrong than I expected. ;-)
|
---|
In Section
Seekers of Perl Wisdom