Minecraft RCON with Perl

RCON, or Remote Console, is a way to manage a minecraft server from another computer with a console. The Minecraft::RCON module needs to be installed from CPAN first.

use Minecraft::RCON;

my $rcon = Minecraft::RCON->new({
address => 'devdungeon.com',
port => 25565,
password => "secretPassword",
});

if (!$rcon->connect) {
        print "Error connecting";
}

# Run any rcon command now with $rcon->command()
print $rcon->command('help');

$rcon->disconnect;