Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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

Comment on Re: save output of program in another file
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2016-02-12 05:45 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (388 votes), past polls