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

Answer: how do i redirect STDOUT, STDIN, or STDERR to a FILE?

by pwesthagen (Initiate)
on Apr 04, 2012 at 22:52 UTC ( #963548=categorized answer: print w/replies, xml ) Need Help??

Q&A > input and output > how do i redirect STDOUT, STDIN, or STDERR to a FILE? - Answer contributed by pwesthagen

Try this, worked for me:
open FILE, ">$file"; select FILE; # print will use FILE instead of STDOUT print "Hello, world!"; # goes to FILE select STDOUT; # back to normal print "Goodbye."; # goes to STDOUT

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[Corion]: Is anybody aware of what makes Android Oreo better than Android Nougat? I'm not sure if the architectural changes (etc) are there already that make upgrading an Oreo-kernel phone to a newer Android userland (Lineage OS) version feasible
[Corion]: Yeah, CryTek got blindsided (or whatever) by Unity and Unreal Engine being zero cost, and the CryTek documentation being bad/nonexistent I think
[Corion]: "zero monetary cost", because of course, it's gratis only if your time has no value :)
[marto]: I used to keep up to date with my android ROMs, updating to the nightly every other day
[marto]: in my experience the jump in major releases has been painless, and performed better
[marto]: Corion if your device has an official Oreo ROM I'd do a nandroid backup and give it a shot

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2017-12-14 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (389 votes). Check out past polls.

    Notices?