#!/usr/bin/perl use Net::XMPP; my $con = Net::XMPP::Client->new( debuglevel => 5, debugfile => "stdout", debugtime => 1 ); print "trying ... \n"; my $status = $con->Connect( hostname => 'gcm-preprod.googleapis.com', connectiontype => 'tcpip', port => 5236, tls => 1 ssl_ca_path => '/etc/ssl/localcerts/gcm.key' ); die('ERROR: XMPP connection failed') if ! defined($status); $con->Disconnect();