mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +01:00
15 lines
409 B
Text
15 lines
409 B
Text
|
#!/usr/bin/env perl
|
||
|
|
||
|
use IO::Socket;
|
||
|
|
||
|
$socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1",
|
||
|
PeerPort => 1234,
|
||
|
Proto => "tcp",
|
||
|
Type => SOCK_STREAM);
|
||
|
|
||
|
# Send the length of the first argument as a byte.
|
||
|
$socket->send(chr(length($ARGV[0])));
|
||
|
# Send the first argument as a string.
|
||
|
$socket->send($ARGV[0]);
|
||
|
|