I need to write a script getPwd.pl($user) that parses a password file an returns the password for a particular user.
file to parse (password.txt)
DEFINE ALICE = 'alice#1';
DEFINE BENICE = 'benice#1';
DEFINE CATHY = 'cathy#1';
A second script authUser.pl must call getPwd.pl($user) and the returned value will be passed into the second script to authenticate a user.
Modules is not a option as the getPwd.pl will be owned by a different user and I will be using sudo to execute getPwd.pl.
Please assist and provide some guidance on how to go about this.