in reply to File Redirection

The shell that's spawned via system inherits perl's file handles STDIN, STDOUT and STDERR, but it is free to close and reopen them.

You can redirect all file handles via the standard shell redirectors, e.g.

system "script.ksh <inputfile 1>outputfile 2>errorfile";

but not back into the parent (perl) process, since it has no control over the filehandles, instead waits for the child to exit. You'll need open for reading/writing one of STDIN/STDOUT, IPC::Open2 for input and output, and IPC::Open3 for STDIN,STDOUT and STDERR control from within perl.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}