Hola. Es que he tratado de compilarlo pero me manda este error:
- Code: Seleccionar todo
doesn't claim to be a serial port at progra.pl line7
can't call method "baudrate" on an undefined value at progra.pl line8
El código es este:
#!C:\perl\bin\perl.exe -w
use Win32::SerialPort;
$com="COM5"; # no colon here!
$PortObj=Win32::SerialPort->new($com);
$PortObj->baudrate(9600);
$PortObj->databits(8);
$PortObj->parity("none");
$PortObj->stopbits(1);
$PortObj->handshake("none");
$PortObj->write_settings;
$Message="probando";
$PortObj->write("AT+CMGF=1 & Chr$(13)");
$PortObj->write("AT+CSCA= & Chr$(34) & 12345 & Chr$(34) & Chr$(13)");
$PortObj->write("AT+CMGS= & Chr$(34) & +5410 & Chr$(34) & Chr$(13) ...