in reply to Using Perl instead of awk!

Something like this should get you started:

use strict; use warnings; my $fname = '/dir/file'; open my $fh, '<', $fname or die "error: open '$fname': $!"; while (<$fh>) { next unless /something/; my @flds = split; print "$flds[2]\n"; }
See open and split.