I need to write a perl program which is equivalent to this shell program. Any help would be appreciated.
cat /var/adm/messages | grep -i errors > /tmp/file1
cat /tmp/file1 | awk '{print $1, $2, $3}' > /tmp/file2
while read col1 col2 col3
do
variable1=`unix_command $col1 | awk '{print $1, $2...