Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Part of the difficulty of my question is from not knowing the proper terminology for what I would call "command channels" (I/O pipes, maybe?). For instance STDIN/OUT is what I would call command channel "1", and STDERR would be "2". Commonly used in UNIX to redirect various outputs wherever we want them.
Ok, so this is simple. We've all done this. No big deal. Well, I need to be able to read input into my script from channel "3". That is it, and that is all. :)
An example:# printf "this is my text on input 3" | ./myscript.cgi 3<&0
That last bit (for those not familiar with UNIX redirects), "3<&0" will redirect the piped input on channel "1" to channel "3". A very easy method to test for success. :)
Whelp, that's it! Does anybody have any idea on how to do this? My only knowledge of how to read in command line options is with "Getopt" and I am unaware of any way to specify input other than from STDIN (the default).
Thanks,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading in from CLI (UNIX)
by chip (Curate) on Dec 19, 2001 at 11:57 UTC | |
by tilly (Archbishop) on Jan 01, 2002 at 21:42 UTC | |
by chip (Curate) on Jan 03, 2002 at 03:23 UTC | |
by tilly (Archbishop) on Jan 03, 2002 at 05:51 UTC | |
|
Re: Reading in from CLI (UNIX)
by ariels (Curate) on Dec 19, 2001 at 13:12 UTC |