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.
In reply to Re: "Use of uninitialized value" even though the value is defined
by moritz
in thread "Use of uninitialized value" even though the value is defined
by mandrake00
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |