> -----Original Message----- > From: SilverFox [mailto:[EMAIL PROTECTED] > Sent: Sunday, August 10, 2003 4:58 PM > To: [EMAIL PROTECTED] > Subject: Net::Telnet > > > hey anyone know how to check if a file exists using the Telnet module? > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > try: $file_exists = $t->cmd("perl -e 'print 1 if (-s \"file\")'") or warn "Unable to execute command: $!\n"; if ($file_exists) { # do whatever }
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]