#!/usr/bin/perl -w use strict; check(qw(a b c)); sub check { my %hash = ( a => 'here', b => 'present', c => 'me too', ); for (@_) { print "$hash{$_} has a value\n"; } }