perl -alne 'print $F[1] if /user\@example.com/' /home/bob/db.txt
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/; }
In reply to Re: Perl equivlanet of simple awk
by repellent
in thread Perl equivlanet of simple awk
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |