Posted on 2008-06-30 15:15:07-07 by rmurri
'REF' not allowed as a sink for output redirection ??
Hello,
I'm trying to use IPC::Run's "run" for writing a script which should run a "zpool status" command and alert if it does not complete within a timeout.
I get an error:
'REF' not allowed as a sink for output redirection at ./check_zfs.pl line 160

Here's the relevant section of the script:
149 # pre-allocate 10k into $zpool_cmd_stdout and _stderr 150 my $zpool_cmd_stdout = '\n' x 10_000; 151 my $zpool_cmd_stderr = '\n' x 10_000; 152 153 my $timer; 154 155 $timer = timeout($timeout); 156 eval { 157 $zpool_cmd_stdout = ''; 158 $zpool_cmd_stderr = ''; 159 # COMMAND STDIN STDOUT STDERR 160 run \@zpool_list, \undef, \$zpool_cmd_stdout, \$zpool_cmd_stderr, \$timer; 161 };

To me, the way I use "run" matches the examples in the docs. What am I doing wrong?
Using Solaris' PERL 5.8.4 and IPC::Run 0.80.
Thank you very much for any hint!
Regards, Riccardo
Direct Responses: 8203 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.