Regarding part of your your question "I'm looking for a way to make the failure of mkdir more informative for the case that the directory already exists. I keep the mkdir line so that it will work the first time it is used. Every subsequent time, it fails, and $! is stone silent.", I'd suggest creating a function that checks whether the directory exists before creating it, something like (untested):
sub createDir { my $dirName = shift; if (-e $dirName) { if (-d $dirName) { return "Directory $dirName already exists!"; } else { return "Can't create $dirName because there's a file in th +e way!"; } } mkdir $dirName or return $!; }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: using online translation engines with perl
by roboticus
in thread using online translation engines with perl
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |