in reply to Re^2: Finding Usable Nodes in our Cluster
in thread Finding Usable Nodes in our Cluster
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";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Finding Usable Nodes in our Cluster
by Andrew_Levenson (Hermit) on Apr 11, 2008 at 20:18 UTC | |
by jwkrahn (Abbot) on Apr 12, 2008 at 01:12 UTC |
In Section
Cool Uses for Perl