Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Writing to an output file

by hippo (Bishop)
on Apr 18, 2019 at 08:50 UTC ( [id://1232749]=note: print w/replies, xml ) Need Help??


in reply to Writing to an output file

How do I get all the printing to write into a new file?

See select.

Replies are listed 'Best First'.
Re^2: Writing to an output file
by haukex (Archbishop) on Apr 18, 2019 at 18:44 UTC
    See select.

    A very good point regarding the "all the printing" part of the question! ameezys: Note that the effect of select is global, so it has the potential of affecting code in modules that you call after the select, and if you want to resume printing to STDOUT after writing the file, you'll have to store the return value of the first select to use for restoring the output handle later. Note you can always print to a specific filehandle, e.g. print {$filehandle} $output; or print STDOUT $output;.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-16 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found