use Data::Dumper; sub ERRORS { print "ERRORS called\n"; print Dumper(\@_); } $a = ERRORS{"CRITICAL"};