in reply to "Use of uninitialized value" even though the value is defined
Please always use strict; use warnings; and declare your variables.
You don't check the success of the second open call. If the open() fails, there will be no lines in @fp0 (same if the file exists but is empty), and $fp will be undef.
You can also use autodie to prevent such errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "Use of uninitialized value" even though the value is defined
by mandrake00 (Initiate) on Apr 01, 2011 at 10:12 UTC | |
by jwkrahn (Abbot) on Apr 01, 2011 at 11:04 UTC | |
by mandrake00 (Initiate) on Apr 01, 2011 at 10:24 UTC |