in reply to Perl equivlanet of simple awk

This equivalent on the command line:
perl -alne 'print $F[1] if /user\@example.com/' /home/bob/db.txt

See Command Switches.

Expanded code:
use warnings; use strict; open my $FH, '<', '/home/bob/db.txt' or die $!; while (local $_ = <$FH>) { chomp; print((split ' ')[1], "\n") if /user\@example.com/; }

Update: Added expanded code.