in reply to why does open ">..." sometimes touches the directory?
In Linux '>' redirect symbol is used to create new file, if the file exists it removes the existing content and creates new file.
Use Three-argument open(), to open a file its safer open my $fh, '>', $filename or die "Can't write to '$filename': $!\n"; Update:
Shorthand Flags:
Entities Definition
|
|---|