print $_ foreach(@open);
You don't really need the loop there:
print @open;
And it might be better if you used strings instead of arrays:
use strict; use warnings; my $zero = "\nZero Active Processors:\n\n"; my $one = "\nOne Active Processor:\n\n"; foreach ( `ganglia proc_run` ) { $zero .= $_ if /\s0\s+$/; $one .= $_ if /\s1\s+$/; } print "$zero$one\n";
In reply to Re^3: Finding Usable Nodes in our Cluster
by jwkrahn
in thread Finding Usable Nodes in our Cluster
by Andrew_Levenson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |