#!/usr/bin/perl use strict; my @array = ( {key1=>0, key2=>2, key3=>3}, {key1=>1, key2=>2, key3=>3}, {key1=>0, key2=>2, key3=>3} ); my $amount = scalar(@array); if (!$array[0..$amount]->{key1}) { print "no\n" }