in reply to How to execute stat command in remote server

Your telnet cmd is interacting with ksh, not perl, at the other end. So you need to tell it to run something. You could, for example, tell it to run:

@contents = $telnet->cmd(qq(perl -e '$,=$/; print stat(shift)' $logfil +e));
But if you only need mtime, you could tell the remote perl to just return that.
@contents = $telnet->cmd(qq(perl -MFile::stat -e 'print stat(shift)->m +time()' $logfile));
Hope that helps.