Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: capturing stderr of echo piped to a file

by Crackers2 (Parson)
on Oct 28, 2014 at 22:10 UTC ( #1105381=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $command = "echo $writeline >> $file";
    my $output = `$command 2>&1`;
    
  2. or download this
    my $output = `$command echo $writeline >> $file 2>&1`;
    
  3. or download this
    my $output = `$command echo $writeline 2>&1 >> $file`;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2023-03-26 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?