home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!dtix!mimsy!ra!fenner
- From: fenner@cmf.nrl.navy.mil (William C Fenner)
- Newsgroups: comp.lang.perl
- Subject: Re: Help with named pipes
- Message-ID: <3310@ra.nrl.navy.mil>
- Date: 12 Aug 92 15:11:56 GMT
- References: <1992Aug12.140317.1603@rock.concert.net>
- Sender: usenet@ra.nrl.navy.mil
- Organization: NRL Connection Machine Facility, Washington, DC
- Lines: 20
-
- In article <1992Aug12.140317.1603@rock.concert.net> cole@concert.net (Derrick C. Cole) writes:
- |#!/usr/local/bin/perl
- |
- |($pipe) = @ARGV;
- |$pipe = "/var/log/modemlog" unless $pipe;
- |
- |if (-p $pipe) {
- | open(FIFO, "$pipe") || die "can't open $pipe\n";
- | while (<>) {
- | read(FIFO, $buf, 120);
- | print "$buf";
- | }
- |}
-
- Why are you reading from <>? The C code didn't read anything from anything
- other than the pipe. Do you mean while (1)?
-
- Bill
- --
- Bill Fenner fenner@cmf.nrl.navy.mil
-