Dear Christopher,

Keyboard input comes on STDIN, and you can not use STDIN for something
else if you need the keyboard.  [It *might* be possible to reopen the keyboard
file descriptor, but ask a Unix C programmer].

Usually, you would make either the file to be processed an option or the actions
you want as options.  See Edward's suggestion for this.  Also consider FIFO
special files (man fifo).

exec is used to replace the current process with another process.  STDIN,
STDOUT and STDERR are passed on (automatically?).  The idea is you rename
STDIN as another file descriptor, and then the new process will reopen
STDIN with
input coming from the keyboard.  Or something like that.

I think you need to search for unix systems programming (in C).  Once you know
how it is done in C, work out how to do the same in Perl.

Jonathan Paton [Writing of things I have little experience of]

-- 
#!perl
$J=' 'x25 ;for (qq< 1+10 9+14 5-10 50-9 7+13 2-18 6+13
17+6 02+1 2-10 00+4 00+8 3-13 3+12 01-5 2-10 01+1 03+4
00+4 00+8 1-21 01+1 00+5 01-7 >=~/ \S\S \S\S /gx) {m/(
\d+) (.+) /x,, vec$ J,$p +=$2 ,8,= $c+= +$1} warn $J,,

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to