in reply to trying to convert from awk to perl

Your awk program is more verbose than it needs to be. The default action is to print $0, and since all you're doing is matching $1 at the beginning of the string, you may as well be matching $0. So your awk program could just be:
awk '/^F/' # Correction...should be awk '$1 ~ /^F/'
And actually, there's no reason you couldn't just use grep for this.

Update: ambrus is correct below. Oops.

Replies are listed 'Best First'.
Re^2: trying to convert from awk to perl
by ambrus (Abbot) on Jan 09, 2006 at 19:32 UTC
    and since all you're doing is matching $1 at the beginning of the string, you may as well be matching $0.

    That's not true, the line

    Foo
    will not match /^F/ but as the leading space doesn't get into $1, $1 ~ /^F/ will be true.