in reply to give perl an email

Not too bad, if you've read perlman:perlipc. Here's a little demo that (only works on Unix?) prints out everything you send to it. Astute applicants will know where to go from here:
#!/usr/bin/perl -w use strict; my $FIFO = "$ENV{HOME}/pipe"; while (1) { unless (-p $FIFO) { unlink $FIFO; system('mknod', $FIFO, 'p') && die "Can't make pipe $FIFO: $!"; } open (FIFO, "$FIFO") || die "Can't open $FIFO: $!"; while (<FIFO>) { chomp; print "Command sent: $_\n"; } close FIFO; }
This creates a new named pipe in your home directory named, appropriately enough, pipe. You can echo commands to it or attach it at the end of any pipe. It's not terribly exciting, but it's the basics of what I think you want to do.

Replies are listed 'Best First'.
RE: Re: give perl an email
by BBQ (Curate) on Apr 18, 2000 at 05:22 UTC
    On a side note:
    Yeah, it only works on *nix... Notice the system()? Its pretty safe to say that whenever you do that, you're going to find serious portability issues.

    Then again, I've never seen qmail for anything not *nix... :o)