mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-13 19:04:54 +01:00
16 lines
450 B
Text
16 lines
450 B
Text
|
#!/usr/bin/env perl
|
||
|
|
||
|
use IO::Socket;
|
||
|
|
||
|
$socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1",
|
||
|
PeerPort => 1235,
|
||
|
Proto => "tcp",
|
||
|
Type => SOCK_STREAM);
|
||
|
|
||
|
my $message = join " ", @ARGV;
|
||
|
|
||
|
# Send the length of the first argument as four bytes.
|
||
|
$socket->send(pack("L", length($message)));
|
||
|
# Send the first argument as a string.
|
||
|
$socket->send($message);
|