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;
In reply to Re: Perl equivlanet of simple awk
by wind
in thread Perl equivlanet of simple awk
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |