Unknown User wrote:
I have written a script that uses ipc::run on an array, like this, based on a previous post here:
I see no usage of "ipc::run" there, did you maybe mean "IPC::Run"?
m...@host101: cat ipc #!/usr/bin/perl -w use strict; use IPC::Run qw/run/; my (@hosts,@cmd,$task); @hosts = qw/localhost localhost host101/; foreach my $host (@hosts) { $task = sub { qx/ssh $host uptime/ }; push(@cmd,"$task",'&'); }
What dou think that C<"$task"> is? What do you think is in @cmd? Add C<use Data::Dumper;> and a C<print \...@cmd;> to see.
run \...@cmd;
-- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/