deprecated has asked for the wisdom of the Perl Monks concerning the following question:
So the approach I came up with was using mkfifo(1) and this eensy-weensy loop:
The problem is, this doesnt actually stay open and alive. It dies after the first "echo 'hello' > foo".#!/usr/local/bin/perl open FIFO, "<foo" or die "$!\n"; while (<FIFO>) { chomp; print "$_\n"; }
Is there a way I can make perl "listen" to a file and actually have it be parsing data and doing inserts on a db?
thanks,
brother dep.
--
Laziness, Impatience, Hubris, and Generosity.
|
---|
Replies are listed 'Best First'. | |
---|---|
(Ovid) Re: Active Munging via a pipe (code)
by Ovid (Cardinal) on Jan 17, 2002 at 00:03 UTC | |
Re: Active Munging via a pipe (code)
by PrakashK (Pilgrim) on Jan 17, 2002 at 00:15 UTC | |
Re: Active Munging via a pipe (code)
by broquaint (Abbot) on Jan 16, 2002 at 23:45 UTC | |
Re: Active Munging via a pipe (code)
by Zaxo (Archbishop) on Jan 17, 2002 at 06:51 UTC | |
Re: Active Munging via a pipe (code)
by count0 (Friar) on Jan 17, 2002 at 01:54 UTC | |
Re: Active Munging via a pipe (code)
by gt8073a (Hermit) on Jan 17, 2002 at 00:18 UTC |