in reply to Trouble with an array inside a format call
Pointing out line 410 would have been helpful.
In your subroutine db_report you have a line "my @ref_Computer ...". This means @ref_Computer is local to that subroutine. The format line at the end of your program is outside of that sub, so all the $ref_Computer[x] there refer to the global variable @ref_Computer which is unused and empty. Solution: Move the format inside the subroutine.
You shouldn't use global variables that have the same name as local variables. Even better, don't use global variables at all if you can avoid it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble with an array inside a format call
by vendion (Scribe) on Oct 15, 2009 at 13:59 UTC |