in reply to Completely lost - 'Use of uninitialized value in pattern match...' error :(
It's not an error, it's a warning. But yes, it's saying that $line (and thus, $source[2]) is uninitialized. You should probably check to see if there's anything in @source before you use it.
In Section
Seekers of Perl Wisdom