in reply to Creating a new file in a directory
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Creating a new file in a directory
by parthodas (Acolyte) on Aug 21, 2015 at 07:40 UTC | |
by Corion (Patriarch) on Aug 21, 2015 at 07:42 UTC | |
by parthodas (Acolyte) on Aug 21, 2015 at 07:47 UTC | |
by Corion (Patriarch) on Aug 21, 2015 at 07:49 UTC | |
by parthodas (Acolyte) on Aug 21, 2015 at 07:51 UTC | |
by parthodas (Acolyte) on Aug 21, 2015 at 07:56 UTC |