use 5.10.0; open my $fh, "<", "fifo" or die; while (1) { my ($line) = <$fh> or sleep 1 and redo; chomp $line; say "FIFO> $line"; }