Ann Gentile gentile-at-dancer.ca.sandia.gov |Lists| wrote:
> whereas using:
>
> my ($start,$step,$names,$data) = RRDs::fetch ...
> foreach my $line (@$data) {
> print " ", scalar localtime($start), " ($start) ";
> $start += $step;
> foreach my $val (@$line) {
> printf "%12.1f ", $val;
> }
> print "\n";
> }
>
> prints out:
> 1142539080 23.5
> 1142539140 0.0
Hi there,
I'm pretty sure the RRDs::.* subs return the perl undef value (not the
"undef" string) where the CLI verison returns the string "NaN". Did you
try running your script from above using the -w / enable warnings flag
to perl? Doesn't printf printout 0.0 because $val was undef and issue a
warning too?
Try this instead:
use warnings;
...
...
use Data::Dumper;
# to see the "real" data structure....
print Dumper($data);
Peter
--
Peter Valdemar Mørch
http://www.morch.com
--
Unsubscribe mailto:[EMAIL PROTECTED]
Help mailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi