#!/usr/bin/perl use warnings; use strict; # This is a program which reads in a list of file names from the command # line and prints which files are readable, writable and/or executable, # and whether each file exists. while ( <> ) { print "$ARGV is readable!\n" if -r ARGV; print "$ARGV is writable!\n" if -w ARGV; print "$ARGV is executable!\n" if -x ARGV; print "$ARGV exists!\n" if -e ARGV; close ARGV; } # end while