Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: save output of program in another file

by pvaldes (Chaplain)
on Jun 06, 2013 at 20:54 UTC ( #1037512=note: print w/replies, xml ) Need Help??

in reply to save output of program in another file

print to outfile.txt:

open $MYFILE, '>', "outfile.txt"; print $MYFILE "blah blah blah"; ### don't put "," after $MYFILE close $MYFILE;

what do i do in the command line?

i.e. in bash, you make a pipe with ">"

perl > everythingwasfine-im-the-output.txt 2>somethingwaswrong-im-the-log.log

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037512]
[stevieb]: I finally got all of my tests to run against my App::RPi::EnvUI!! I am so pleased :) Now to add more tests, update the documentation, some code cleanup, put in production in my largest operation, and do a non-beta release

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-12-16 00:14 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (446 votes). Check out past polls.