Hello Monks!
This is the first time I write something here. Mostly I found solutions in documentations, existing entries here or platforms like stackoverflow.This time I wasn't able to find a similar problem anywhere, so I decided to ask myself.
(There may be already the question answered anywhere I have, but I didn't get it, it was the same problem.)
When this part of code is executed it tells meforeach my $file ( @files ) { open(my $fh, ">>", $file->{full_path}); # or return(0); print $fh $file->{content}; close($fh); # or return(0); chmod(0755, $file->{full_path}); print "Created \"$file->{full_path}\" with $file->{line_counte +r} line" , ( $file->{line_counter} > 1 ) ? "s" : "" , "\n"; }
print() on closed filehandle $fh at ./Make.pl line 223. Can't open perl script "../Path/to/file.pm": File or directory not fou +nd
I feel as if the open() wasn't executed every time as I expected
The loop is executed within a subroutine.
In reply to foreach a writing open fails through not found file by DomX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |