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