SPUG: Is format evil?
Ryan Allen
ryan at the-summit.net
Fri Mar 9 11:58:42 PST 2007
No I'm not complaining, just in need of a little sage guidance.
Does anybody know a painless way to send a format to two places at once?
I'd like for the format to go to STDOUT and an open filehandle. For
example:
sub displayUpgradeConfig(){
my ($k, $v);
my $c = 1;
format STDOUT =
blade @<< : @<<<<<<<<<<<<<<<< : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$c, $k, $v
.
foreach $i (\%blade1, \%blade2, \%blade3, \%blade4){
while ( ($k, $v) = each (%$i)){
write;
write $logFH;
}
$c++;
}
}
Notice the two "write" lines. Possible? I'm pulling my hair out? The
above code produces this error:
Undefined format "Symbol::GEN0" called at ./clusterInstaller line 531.
Thanks!!
-Ryan
--
+-----------------------------+
| ryan at the-summit.net |
| http://www.the-summit.net |
+-----------------------------+
More information about the spug-list
mailing list