kaatunut has asked for the wisdom of the Perl Monks concerning the following question:
local *STDOUT=$fh;
should work - I think - but it doesn't. I can't use print() on sockets (I tried). I don't want to make all remote code use syswrite instead of print - so, I try to redefine print() to a wrapper and eventually syswrite. But, it appears I can't do that. I could redefine chdir() just like man perlsub said, but the very same code with print() doesn't work.
What am I doing wrong? Any suggestions? Since this is a practical problem, anything fixing the problem of print() in eval'd code going to socket would be helpful.
Also, note that this has to run under cygwin perl, so some platform-dependent tricks may be unavailable. Recent versions of perl, however, aren't a problem.
-Kaatunut
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(bbfu) Re: Remote interpreter (redefining print())
by bbfu (Curate) on May 08, 2001 at 01:39 UTC | |
by no_slogan (Deacon) on May 08, 2001 at 01:49 UTC | |
by bbfu (Curate) on May 08, 2001 at 01:56 UTC |