#!/usr/bin/perl
# /----------\
# |robot say!|
# \---\ /----/
#     /
# [-]  
# (+)=C
# | | 
# OOO
# WHAT YOU SAY?
# this program makes a robot
# the robot says what you tell it to on the command line
# you need to escape chars, this program isn't very smart...
# bad perl code at it's best!

# robot finds kitten
# http://www.robotfindskitten.org
# version 0.1 Adam Northern
# anorthern@redhotlunix.com

$robot[0] = " [-]  ";
$robot[1] = " (+)=C";
$robot[2] = " | |  ";
$robot[3] = " OOO  ";

$whatToSay = join(" ", @ARGV);
$amountOfChars = length($whatToSay);

$text[0] = ' /';
for($i = 0; $i < $amountOfChars; $i++) {
	$text[0] .= '-';
}
$text[0] .= '\\';
$text[1]  = ' |';
$text[1] .= $whatToSay;
if (length($whatToSay) != $amountOfChars) {
	for ($i = 0; $i < $amountOfChars; $i++) {
		$text[1] .= " "
	}
} 
$text[1] .= '|';
$text[2] = ' \\---\\ /';
for($i = 6; $i < $amountOfChars; $i++) {
	$text[2] .= '-';
}
$text[2] .= '/';
$text[3] = '     /';
for($i = 0; $i < 4; $i++) {
	$text[$i+4] = $robot[$i];
}
for($i = 0; $i < 8; $i++) {
	print $text[$i] . "\n";
}

