I have an interactive perl script. The script Adds, Finds or Deletes a user from a Unix system.
print "Add, Find, Delete, or Exit (AFDE)? ";
$answer = <STDIN>;
chomp $answer;
while ($answer ne /^E\b/i) {
find_user();
}elsif ($answer =~ /^A\b/i ) {
add_user();
}elsif ($answer =~ /^D\b/i ) {
find_user();
find_deletees();
questions();
}
}
When I run this I keep getting the error
Use of uninitialized value in pattern match (m//) at line 129 <STDIN> line 1
line 129 is "while" and after trying everything I can think of I cannot get rid of this error.
Does anyone else see where I have messed up
Thanks
print "Add, Find, Delete, or Exit (AFDE)? ";
$answer = <STDIN>;
chomp $answer;
while ($answer ne /^E\b/i) {
find_user();
}elsif ($answer =~ /^A\b/i ) {
add_user();
}elsif ($answer =~ /^D\b/i ) {
find_user();
find_deletees();
questions();
}
}
When I run this I keep getting the error
Use of uninitialized value in pattern match (m//) at line 129 <STDIN> line 1
line 129 is "while" and after trying everything I can think of I cannot get rid of this error.
Does anyone else see where I have messed up
Thanks