#!/usr/local/bin/perl

use blib;
use Getopt::Long;
use Net::SNPP;

$opt_debug = undef;
$opt_h = undef;
$opt_p = undef;

GetOptions(qw(debug h p));

die "usage: $0 -h <host> -p <pagerid> <message>"
	unless defined $opt_h && defined $opt_p && @ARGV;

Net::SNPP->debug(1)
	if $opt_debug;

$snpp = Net::SNPP->new($opt_host);

$snpp->pager_id($opt_p) || die $snpp->message;
$snpp->content(join(" ",@ARGV)) || die $snpp->message;
$snpp->send() || die $snpp->message;

$snpp->quit;

__END__

or you could dp

$snpp = Net::SNPP->new($opt_host);

$snpp->send( Pager   => $opt_p,
	     Message => join(" ",@ARGV),
	     Alert   => 1,
	     Hold    => time + 3600
	   ) || die $snpp->message;

$snpp->quit;
