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

Correct way to capture command output to a file in Perl.

by perl514 (Pilgrim)
on May 01, 2013 at 19:07 UTC ( [id://1031633]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    use warnings;
    ...
    {
      #-- do something here
    }
    
  2. or download this
    use warnings;
    use strict;
    ...
    my $output = `example.exe`; 
    die "$!" if $?; 
    print $file $output;
    
  3. or download this
    use Learning::Perl;
    use Beginning::Perl::Ovid;
    print "Awesome Books";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-03-29 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found