#!/usr/bin/env perl use strict; use warnings; use Ref::Util 'is_arrayref'; my $item = { x => 'a', y => ['b', 'c'] }; for my $key (keys %$item) { if (is_arrayref $item->{$key}) { print "Value for $key is an arrayref\n"; } else { print "Value for $key is not an arrayref\n"; } }