Tim: I know, I know: I excluded the "or die" portion for readability/simplicity. On Wed, 27 Mar 2002, Timothy Johnson wrote: > You'd probably have better luck testing for the open() command's success I wrote: >> use Getopts::Std; >> getopts("n"); >> open(OPT_LOG,">/tmp/foo.txt") if ($opt_n); >> while (<>) { >> print OPT_LOG $_ if OPT_LOG; >> } >> close(OPT_LOG) if OPT_LOG; -- Eric P. Los Gatos, CAThread Previous | Thread Next