Created
February 11, 2017 07:46
-
-
Save moznion/aba5a98423dd722c5e549cf66bd00895 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use IO::Socket; | |
my $socket = IO::Socket::INET->new( | |
PeerAddr => 'localhost', | |
PeerPort => 11211, | |
Proto => 'tcp', | |
); | |
my $set = join "\r\n", map {"set $_ 0 0 1\r\nx"} 1..100; | |
my $get = join "\r\n", map {"get $_"} 1..100; | |
$socket->print("$set\r\n$get\r\nquit\r\n"); | |
my @lines = $socket->getlines; | |
$socket->close; | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment