Is there a newline in $mycrdir? Also, you should output the reason why open fails:
my $filename = "$mycrdir/file_detail.txt"; open my $OUT, '>>', $filename or die "Can't create '$filename': $!";
The error reason maybe gives you a better hint at what fails. Also try hardcoding $mycrdir in your script first to see whether whitespace or other stuff might be a problem.
In reply to Re: Creating a new file in a directory
by Corion
in thread Creating a new file in a directory
by parthodas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |