I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2011-02-01 12:42:08.896473-08 by vitsin
Device Modem.pm line 676.
SMS is sent fine(wireless modem), but sms_send() always returns: Quantifier follows nothing in regex; marked by <-- HERE in m/+ <-- HERE CMGS/ at /usr/local/share/perl/5.10.1/Device/Modem.pm line 676. Manufacture: Sierra Wireless, Incorporated # cat /proc/version Linux version 2.6.35-22-server (buildd@yellow) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) ) #35-Ubuntu SMP Sat Oct 16 22:02:33 UTC 2010 # uname -a Linux ns3 2.6.35-22-server #35-Ubuntu SMP Sat Oct 16 22:02:33 UTC 2010 x86_64 GNU/Linux root@ns3:~# perl -v This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
use strict; use Device::Gsm; print "I hope I can send an SMS on your GSM phone attached to...\n"; my $myport = '/dev/ttyUSB2'; my $gsm = new Device::Gsm( port => $myport, log => 'file,send.log', assume_registered => 0, loglevel => 'debug', pin => '0000' ); die "cannot create Device::Gsm object!" unless $gsm; $gsm->connect( baudrate => 9600 ) or die "cannot connect to GSM device on [$myport]\n"; $gsm->register() or die "cannot register on GSM network: check pin and/or network signal!"; my $level = $gsm->signal_quality(); print "signal quality: $level\n"; print "\nok! connected and registered to network\n"; my $number = '+16479906864'; my $content = 'Test Hello World'; $content = substr( $content, 0, 140 ); # text SMS print "\nSending SMS ...\n"; my $res = $gsm->send_sms( content => $content, recipient => $number, class => 'normal', mode => 'text' ); if ($res) { print "SMS sent!\n" ; } else { print "Error in sending\n"; }
Direct Responses: Write a response