in reply to Use of unitialized, why?

$ftp->mdtm($_): function, $ftp is initilized and connected to server before

If $ftp was undef, you'd get "Can't call method "mdtm" on an undefined value at ... line 70.

What's more interesting is the value that $ftp->mdtm($_) returns (because that's what's used in the subtraction)