Help for this page

Select Code to Download


  1. or download this
    $ perl -MJSON -le '$output=`./asdf`; print encode_json([$output])'
    output to stderr
    ["output to stdout\n"]
    $ perl -MJSON -le '$output=`./asdf 2>&1`; print encode_json([$output])
    +'
    ["output to stdout\noutput to stderr\n"]
    
  2. or download this
    $ perl -MData::Dumper -le '$output=`./asdf`;print Dumper $output'
    output to stderr
    $VAR1 = 'output to stdout
    ...
    output to stderr
    ';