in reply to Complaints from Warnings about uninitialized var
It's not <NULL>, it's undef because you've attempted to assign a one element list (the result of your second split) to a list of two variables. This results in undef getting stuck in the second (and if there were more, any subsequent) variable. Even though you've initialized it above, you're blowing that value away. What you probably want to do is to check if $middle is defined after you've split (e.g. $middle = "" unless defined $middle;).
|
|---|