Skip to content

Instantly share code, notes, and snippets.

View simple chat server by using AnyEvent
#!/usr/bin/perl
use strict;
use warnings;
use AnyEvent;
use AnyEvent::Socket qw/tcp_server/;
use AnyEvent::Handle;
my %conns;
View dan-the-shell.pl
#!/usr/bin/perl
use strict;
use warnings;
use URI::Escape 'uri_escape';
use LWP::UserAgent;
use JSON 'decode_json';
use Term::ReadLine;
use String::ShellQuote;
my $ua = LWP::UserAgent->new(agent => "Dan the shell");