#!/usr/bin/perl # print only regular files from a list of files. while (<>) { chomp; print "$_\n" if -f "$_"; } exit(0);