in reply to Error: Uninicialized Value
Look at what my @flds = split '\|', $line; is doing with the lines whose last two fields are empty,
e.g.
|3104|1|New Years|Holiday|Clinic|||
Unfortunately, it does not return zero-length strings for trailing empty fields, as it ought to (and, I thought, used to).
Instead, it doesn't return them at all; @flds is shorter by two.
So you get undef when you try to access the fields at those indices.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error: Uninicialized Value (-1)
by tye (Sage) on Apr 29, 2008 at 18:11 UTC |