#!/perl/bin/perl.exe -w use strict; my @AllowedRanks = ('Recruit', 'General', 'Captian', 'Civilian', 'Airm +an'); 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"; }
In reply to Re: Looking Through Arrays?
by The_Rev
in thread Looking Through Arrays?
by ACJavascript
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |