in reply to Re^4: Why can't I write to a custom log from a Catalyst application on SELinux/CentOS
in thread Why can't I write to a custom log from a Catalyst application on SELinux/CentOS
It's not the debugger, I think the system command (aka backticks) is causing a flush
#!/usr/bin/perl use strict; use warnings; use feature qw{ say }; unlink "./log.txt" or warn "$!"; open OUT, '>>', 'log.txt' or die $!; print OUT "before system\n"; print `type log.txt`; print OUT "after system\n"; open IN, '<', 'log.txt' or die $!; my $nothing = <IN>; say "Before close: $nothing.\n"; close OUT; my $bla = <IN>; say "After close: $bla.\n";
-*- mode: compilation; default-directory: "d:/tmp/pm/" -*- Compilation started at Thu Feb 11 19:29:04 C:/Perl_524/bin\perl.exe -w d:/tmp/pm/auto_flush.pl before system Before close: before system . After close: after system . Compilation finished at Thu Feb 11 19:29:05
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|