http://www.perlmonks.org?node_id=894193

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

For use in a Perl cgi script, what's an equivalent of the following awk command

awk '/user@example.com/ {print $2}' /home/bob/db.txt

Assume db.txt contains 4 columns, with a valid email address in the first column, and a password in the second column. (For this purpose, security isn't an issue.) I just want to retrieve a password associated with an email address.