From: C.DeRykus on 15 Nov 2009 14:28 On Nov 13, 10:04 pm, "C.DeRykus" <dery...(a)gmail.com> wrote: > On Nov 13, 6:00 am, Thomas Barth <txba...(a)web.de> wrote: > > > Hi, > > any Idea how to get the output of this command into an array? The output > > is still printed to the screen. The array @soxin keeps empty. > > > open(SOXIN, "sox $path -r 8000 -c 1 $src_dir/$basename.vox stat |"); > > my @soxin = <SOXIN>; > > close(SOXIN); > > IPC::Run is another possibility: > > use IPC::Run qw( run ); > use strict ; > use warnings; > > # ***** untested ***** > > run ["sox $path -r 8000 -c 1 $src_dir/$basename.vox stat"], > '<', \my @soxin, \my $err > or die "Markdown.pl failed: $?"; > Blech. A better attempt: run ["sox ..."] , '<', \undef, '>&', \$out_and_err or die "failed: $?"; But IPC::Run isn't the right solution for this task. -- Charles DeRykus
First
|
Prev
|
Pages: 1 2 3 Prev: how to install WWW::Mechanize using yum Next: Please help with processing flat file |