in reply to Re: Checking if all the key values are same in an Array
in thread Checking if all the key values are same in an Array
#!/usr/bin/perl use strict; my @array = ({key1=>1, key2=>2, key3=>3}, {key1=>1, key2=>2, key3=>3}, + {key1=>1, key2=>2, key3=>3} ); my $amount = scalar(@array); if (!$array[0 .. $amount]->{key1}) { print "no\n" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Checking if all the key values are same in an Array
by holli (Abbot) on Apr 26, 2005 at 13:16 UTC |