This will accept any number of files (instead of two). Provide the file names as command line arguments.#!/usr/bin/perl -w if (eval join (" or ", map {$_=" -e '".$_ ."'"}@ARGV)) { print "Hooray at least one of the the files exists"; } else { print "Hohum neither of the files exist"; }
In reply to Re: The or thing.
by Mandrake
in thread The or thing.
by nasa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |