in reply to Perl equivlanet of simple awk

It's possible to do something like that very easily with a one-liner. However, more verbose is probably what you're looking for if you intend to include this within a script.
my $file = '/home/bob/db.txt'; open my $fh, $file or die "$file: $!"; my $pass; while (<$fh>) { chomp; my @fields = split /\s+/; if ($fields[0] eq 'user@example.com') { $pass = $fields[1]; last; } } close $fh;