in reply to how is this uninitialized?
Another way to do it, other than the fine way shown by dragonchild:
my $hodown = @downhosts; my $houp = @uphosts; print "There are $hodown hosts down\n"; print "There are $houp hosts alive\n\n";
Sorry for the variable names, I couldn't resist. This has the benefit of allowing simpler interpolation in a string, and doesn't require the explicit use of scalar. It has the detriment of creating two superfluous variables. I am not necessarily advocating any particular solution, just giving another option. :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how is this uninitialized?
by redlemon (Hermit) on Dec 29, 2004 at 14:10 UTC |