#!/perl/bin/perl.exe -w use strict; my @AllowedRanks = ('Recruit', 'General', 'Captian', 'Civilian', 'Airman'); my $MemberCall = 'General'; foreach my $record (@AllowedRanks) { if("$MemberCall" eq $record) { &Welcome; } else { &NotWelcome; } } sub Welcome { print "Found a match\n"; } sub NotWelcome { print "No Match\n"; }