Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 19 lines (13 sloc) 0.324 kb
#!/usr/bin/perl
use warnings;
use strict;
use Redis;
my $pub = Redis->new();
my $channel = $ARGV[0] || die "usage: $0 channel\n";
print "#$channel > ";
while (<STDIN>) {
chomp;
$channel = $1 if s/\s*\#(\w+)\s*//; # remove channel from message
my $nr = $pub->publish($channel, $_);
print "#$channel $nr> ";
}
Jump to Line
Something went wrong with that request. Please try again.