in reply to Use of uninitialized value
Like pg said, you need to show us the rest of your code. In lieu of that, I'm guessing you call this sub actions before the initializing code
has been run.my $num = 0; my $status_count = 0; my $status_goal = 0;
For example, examine how the following code runs:
use strict; use warnings; print_foo(); my $foo = "bar\n"; sub print_foo { print $foo; } print_foo();
The first call to the sub throws the uninitialized error because the statement my $foo = "bar\n"; hasn't been executed yet. By the second call, that statement has been executed, so there is no warning.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use of uninitialized value
by ikegami (Patriarch) on Nov 07, 2004 at 17:15 UTC | |
|
Re^2: Use of uninitialized value
by rev_1318 (Chaplain) on Nov 07, 2004 at 22:25 UTC |