Here is one way to do the above while giving a decent error message:
- tye (but my friends call me "Tye")my $env; my $tmpdir= $ENV{$env="TMPDIR"} || $ENV{$env="TMP"} || $ENV{$env="TEMP"} || ($env="","/tmp"); if( ! -d $tmpdir ) { die "Invalid temporary directory ($tmpdir)", $env ? " (taken from \$ENV{$env})" : "(please set TMPDIR, TMP, or TEMP in your environment)", "\n"; }
In reply to (tye)Re2: framechat
by tye
in thread framechat
by epoptai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |