It's been a long time since I tried programming, and I'm having some problems. $gust is declared earlier and passed a value from geo::METAR. If there is no wind gust, then no value is passed. I check to see if it's nul, it if is, I want to do something, if it has a value I want to do something else. I'm getting a Use of uninitialized value in concatenation (.) or string at.... error when trying to call $gusting when $gust has no value. It seems like I'm missing something simple here!
my $wind = $m->WIND_MPH;
my $w_dir = $m->WIND_DIR_ENG;
my $gust = $m->WIND_GUST_MPH;
my $gusting;
if ($gust eq "") {
$gusting ="not gusting";
}
else {
$gusting ="gusting to $gust";
}
print "$gusting";
Stuffy
That's my story, and I'm sticking to it, unless I'm wrong in which case I will probably change it ;~)
may be reproduced under the
SDL