Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Open pipe to a function?

by hardburn (Abbot)
on Dec 10, 2003 at 21:44 UTC ( #313889=note: print w/replies, xml ) Need Help??


in reply to Open pipe to a function?

I'd like to use it in a larger script to log STDERR to a file.

You don't need a seperate program for doing that. You can just reopen STDERR to wherever you like:

open(STDERR, '>', '/path/to/logfile') or die "Can't open STDERR to /path/to/logfile: $!\n";

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://313889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2022-01-24 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (64 votes). Check out past polls.

    Notices?