# $program is what you pass in as the Program key
# $progargs is the array reference of arguments
else {
if (ref($program) eq 'ARRAY') {
exec(@$program, @$prog_args)
or die "can't exec (@$program) in child pid $$: $!";
}
else {
exec(join(" ", $program, @$prog_args))
or die "can't exec ($program) in child pid $$: $!";
}
}
####
my $wheel = POE::Wheel::Run->new(
Program => [ $program ], # changed!
ProgramArgs => \@progargs,
StdinEvent => 'stdin',
StderrEvent => 'stderr',
StdoutEvent => "stdout",
StdoutFilter => POE::Filter::Stream->new(),
);
####
$progargs = (q{"SELECT * FROM MY_TABLE;"});