473,657 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't call method "send" on an undefined value

3 New Member
Hi all, newb to Perl here. I'm trying to use the Net:SNPP package to send a page, and getting the above error when trying to send. Here's my code:
Expand|Select|Wrap|Line Numbers
  1. my $host = "snpp.cingular.com:444";
  2.  
  3. my $snpp = Net::SNPP->new( $host );
  4.  
  5. $snpp->send( Pager => $to, Message => $message,);
  6.  
  7. $snpp->quit;
  8.  
I think that the problem may be that we're running Apache on top of a windows server as that seemed to introduce some other problems, but this doesn't make sense to me since I'm definitely defining $snpp, aren't I?

Thanks in advance.
-Karim Varela
Jun 26 '07 #1
1 5884
miller
1,089 Recognized Expert Top Contributor
Whenever connecting to an external host, add error checking that verifies the connection was established.

Expand|Select|Wrap|Line Numbers
  1. my $snpp = Net::SNPP->new( $host ) or die "Unable to create Net::SNPP object";
  2.  
We can predict that the above line will fail because you've already received an error message that says that $snpp is undefined (hence why you can't call "send" on it). It will be up to you to determine why you can't connect.

- Miller
Jun 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7203
by: Kurda Yon | last post by:
Sorry for a very stupid question. Can you tell me what does the following html source does if I press button "Send"? If I read this code by Netscaspe from my local file system and then press "Send", I see in my browser directory where the considered html source is located. If I publish the given html source, open published page and again press "Send" nothing changes... What I want to do, is to know what choice did people who were visiting...
2
6258
by: Gary | last post by:
I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)"); This is not working ..what could be the reason..? Situation: I have a menu in my form, which is given a short key "Ctrl+P", now when the
6
3323
by: Guadala Harry | last post by:
I have some client-side JavaScript that, among other things, calculates the value of a variable (myVar). On the server I have a stored procedure that needs to somehow receive as an input parameter the value of myVar. I need to know how to get the value of myVar from the script up to the server. Specifically, I'd like to have the following happen when the user clicks a button in the browser: 1. The client-side script executes (and...
6
31060
by: Gary | last post by:
Hi, I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)") This is not working ..what could be the reason..?
4
4275
by: Rvo | last post by:
Hi all, I need to use the Netware "send" function to send messages to some/all attached netware users on a server. However, I can't find any documentation on this topic on the Novell site or anywhere else. If any of you has experience on this topic (or knows of any online documentation about it) I would realy appreciate your help. (Which references do I set? Which class to instatiate? What methods do I need to call, ...)
0
1483
by: bruce | last post by:
I'm testing a very simple web services called Add (take 2 integers and return the result). The service program is done in VS.NET and work well using HTTP POST. I wrote a simple (Classic) ASP SOAP Client on the same server (let's call it server A) where the web service is hosted, and it can consume the service just fine. The asp client looks like this: <% strPost="http://localhost/WebService3/Service1.asmx" strPostData="<?xml...
2
6959
by: wpollans | last post by:
Hello, I need to able to write JS that will click on a link with the middle mouse button - so that the link target will open in a new window or tab - using firefox. Or is there a better (more reliable) way to have the link open in a new window/tab (using JS)? I have no control over the JS already on the page - this is for a selenium user extension that I'd like to write.
2
12596
by: somtabu | last post by:
How to send value from frontend to report in VB.Net Actually I have a form in VB.Net and there is a textbox. Now i want to send the textbox value to Crystal Report. How can i do this? Please help
1
6085
by: groupie | last post by:
Hi, I'd like to know how to implement the "Forgot Password" feature on many websites which require a login, exactly like this ebay example: http://cgi4.ebay.com/ws/eBayISAPI.dll?UserIdRecognizerShow I've already retrieved the users password from the database - I just need to send it to the email address entered. From reading many posts, I need a server-side script and rather not use form mailto: nor use javascript on the users PC.
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.