perl command line and file handle.

S

Stephen

Hello,
would the following work if the file name myprog.pl was replaced with
a filehandle or a reference to a filehandle?

system("perl myprog.pl ".$argvc);

this assumes you are using a tied buffer system
and have sent a list of commands into it

tie *FH, 'tiedbuff';
print FH "print \"Hello World\"\n";
print FH "print \"Goodbye World\"\n";
print FH "exit\;\n";


Stephen
 
W

Walter Roberson

: would the following work if the file name myprog.pl was replaced with
:a filehandle or a reference to a filehandle?

: system("perl myprog.pl ".$argvc);

No.

Depending on the system, you -might- be able to use -f /dev/fd$N
where $N = fileno FILEHANDLE

If not, then you probably need to see perlipc
"Bidirectional Communication with Another Process"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top