G
Gomer
How can I search through a list in PERL? For example, I want to
do something like the following:
@namelist = ('JONES', 'SMITH', 'JOHNSON');
print "Enter name of teammate whose password you need to reset, then
press the ENTER key: \n";
$teammate = <STDIN>;
if (grep ($teammate, @namelist))
{ print "I can\'t let you do that...";}
else
{ print "You are going to reset the password for $teammate";}
do something like the following:
@namelist = ('JONES', 'SMITH', 'JOHNSON');
print "Enter name of teammate whose password you need to reset, then
press the ENTER key: \n";
$teammate = <STDIN>;
if (grep ($teammate, @namelist))
{ print "I can\'t let you do that...";}
else
{ print "You are going to reset the password for $teammate";}