See Appendix A, Exercise Answers for the answer.
Convert the following shell script into a Perl program:
cat /etc/passwd | awk -F: '{print $1, $6}' | while read user home do newsrc="$home/.newsrc" if [ -r $newsrc ] then if grep -s '^comp\.lang\.perl\.announce:' $newsrc then echo -n "$user is a good person, "; echo "and reads comp.lang.perl.announce!" fi fi done