awk program in perl

Hi All,
I have an AWK code snippet which I want to use in Perl. How can I achieve the same thing in perl? Here I am searching for a pattern in a file and from that matching line, I am extracting the 3rd column value and storing it in a variable which I later on use this value in a if condition.

NUMBER=$(awk '/Max open files/{print $3}' limits.conf)
if (( NUMBER < 255 )); then
//do-something here
fi

How can the same can be written in perl, if there is no built in mechanism for AWK in perl available?

Thanks in advance.
san

NUMBER=$(perl -alne 'if(/Max open files/) {print @F[2]}' limits.conf)

I guess he's trying to integrate the code in a larger perl script, can use something like:

my $file = "/etc/security/limits.conf";
open(FH, $file);
my @lines = <FH>;
close(FH);
my @line = grep (/Max open files/, @lines);
my @fields = split(/\s+/i,$line[0]);
my $num = $fields[2];