Skip to content

Instantly share code, notes, and snippets.

/gist:829906
Created Feb 16, 2011

Embed
What would you like to do?
#!/usr/bin/env perl
use warnings;
use strict;
my %chats;
undef $chats{"#$_"} for qw(
webgui
flea
);
my $content = do { local $/; <STDIN> };
my ($chat, $msg) = split /\s+/, $content, 2;
$chat =~ s/^\(//;
$chat =~ s/\)$//;
exit unless exists $chats{$chat};
my $title = "($chat) $ARGV[0]";
open my $child, '|-', '/usr/local/bin/growlnotify', $title, qw(-a Adium);
print $child $msg;
close $child;
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.