Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
!/usr/bin/perl -w
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $boxcarurl = '';
# Put your Boxcar token in this file:
my $accesstoken = `cat ~/.boxcartoken`;
sub boxcarpush {
my %notification = @_;
my %fields = (
'user_credentials' => $accesstoken,
foreach (keys %notification) {
$fields{"notification[$_]"} = $notification{$_};
$ua->post($boxcarurl, \%fields);
title => 'message title',
long_message => 'Okay, this is <b>fun</b>.',
sound => 'bird-1',

This comment has been minimized.

Copy link

commented May 15, 2015

slight nitpick: you're missing the # at the beginning of the first line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.