I have some perl scripts that stream input file and parse it in live.
It worked well until Strawberry perl version 5.32.1.1, but it does not work anymore with 5.38.0.1.
I wrote a basic example showing the issue:
#!/usr/bin/perl -w
use strict;
use warnings;
my $IN_STREAM;
open( $IN_STREAM, "<", "file_in.txt" ) or die "Fail to open file_in.txt";
while (1) {
while ( !($_ = <$IN_STREAM>)) {
sleep(1);
}
print "$_";
}
When I run this script with version version 5.32.1.1, I can see the print each time I update file_in.txt.
But with 5.38.0.1, updates in file_in.txt are NOT detected.
Is there a different method to do what I want ?