1#!/usr/local/bin/perl 2# /----------\ 3# |kitten say| 4# \---\ /----/ 5# / 6# |\_/| 7# |o o|__ 8# --*--__\ 9# C_C_(___) 10# WHAT YOU SAY? 11# this program makes a kitten 12# the kitten says what you tell it to on the command line 13# you need to escape chars, this program isn't very smart... 14# bad perl code at it's best! 15 16# robot finds kitten 17# http://www.robotfindskitten.org 18# version 0.1 Adam Northern 19# anorthern@redhotlunix.com 20 21$kitten[0] = " |\\_/| "; 22$kitten[1] = " |o o|__ "; 23$kitten[2] = " --*--__\\ "; 24$kitten[3] = " C_C_(___)"; 25 26$whatToSay = join(" ", @ARGV); 27$amountOfChars = length($whatToSay); 28 29$text[0] = ' /'; 30for($i = 0; $i < $amountOfChars; $i++) { 31 $text[0] .= '-'; 32} 33$text[0] .= '\\'; 34$text[1] = ' |'; 35$text[1] .= $whatToSay; 36if (length($whatToSay) != $amountOfChars) { 37 for ($i = 0; $i < $amountOfChars; $i++) { 38 $text[1] .= " " 39 } 40} 41$text[1] .= '|'; 42$text[2] = ' \\---\\ /'; 43for($i = 6; $i < $amountOfChars; $i++) { 44 $text[2] .= '-'; 45} 46$text[2] .= '/'; 47$text[3] = ' /'; 48for($i = 0; $i < 4; $i++) { 49 $text[$i+4] = $kitten[$i]; 50} 51for($i = 0; $i < 8; $i++) { 52 print $text[$i] . "\n"; 53} 54 55