#!/usr/bin/perl use strict; use warnings; my $input = "/tmp/named.pipe"; die "$input is not really a named pipe\n" unless (-p $input); my $t = scalar localtime; warn "opening input at $t\n"; open( my $p, "<", $input ) or die $!; while(<$p>) { $t = scalar localtime; print "reading at $t, got: $_" }