in reply to Reading in from CLI (UNIX)

Piece of cake:    open STDIN, "<&3" or die;

I suggest you read "perldoc -f open"; it's quite instructive. Oh, and try "perldoc -f sysopen" too, just for kicks.

UPDATE: Removed superfluous parens per my own advice to learn() or die;

    -- Chip Salzenberg, Free-Floating Agent of Chaos

Replies are listed 'Best First'.
Re (tilly) 2: Reading in from CLI (UNIX)
by tilly (Archbishop) on Jan 01, 2002 at 21:42 UTC
    Why not take your advice at Two-arg open() considered dangerous and switch to the 3-arg version of the same?

    Sure, it doesn't make any real difference here, but a good habit is to be encouraged at all turns. :-)

      Using three-arg open for '<&3' would be a good idea, if only it were possible. But my docs say it's not, at least in 5.6. Quoting perldoc -f open:

      Duping file handles is not yet supported for 3-argument open().

      <getsmart>Missed it by this much.</getsmart>

          -- Chip Salzenberg, Free-Floating Agent of Chaos

        D'oh. It is supported in bleadperl, which was the documentation that I looked up before posting...

        My bad.