I think that somehow you're getting an undef in your array of files (@files in the subroutine _rget) returned by parse_files, so when originalLine is called you see that
warning error. It shouldn't happen when you turn off the "Debug" flag, but that's not a very good solution. If you have write access to that file I'd throw a couple of print statements in to see what you're actually getting for files, as well as for the return value of the call to Net::FTP::dir on line 55. If you don't have write access you can throw together a quick subclass that overrides that method and you can examine the information there.
"The dead do not recognize context" -- Kai, Lexx