#!/usr/bin/perl -w use strict; my $FiFo='/opt/WFmon/logs/cpu.comm'; my $read=''; my $timeout=1; my ($nfound); open(FIFO, "<$FiFo") || warn "cannot open fifo\n"; vec($read, fileno(FIFO), 1) = 1; $nfound = select($read, undef, undef, $timeout); if($nfound){ if(vec($read, fileno(FIFO), 1)){ print "here - $nfound\n"; } else{ print "not here - $nfound\n"; } } else{ print "nothing\n"; } close(FIFO);