#!/usr/bin/perl use strict; use warnings; my $exception = {table => 'tablename', exception => 'outofdate'}; my $exception2 = {table => 'tablename2', exception => 'allOk'}; foreach my $error ($exception, $exception2 ) { print "$error->{exception}\n"; } __END__ outofdate allOk