It Sucks. It is Bad. It lacks any form of joy givingness whatsoever. I would rather type this entire paragraph than use this entire thing its so mean I hate it. Because of my extreme dislike over this particular subject, I will be entering Perl Code for the rest of this text info.
!/usr/bin/perl
use warnings;
use strict;
print "I am Parrot Bot\n";
print "Enter a string here: ";
chomp(my $parrotText = );
if ($parrotText=~ /word\s*press/i){
$parrotText =~ s/fun/bad and horrible/gi;
$parrotText =~ s/not\sbad\sand\shorrible/not bad and horrible, it's worse/gi;
}
print($parrotText);
!/usr/bin/perl
use warnings;
use strict;
my @hispanoFamosoList=("Miguel De Cervantes","Simon Bolivar","Jose de San Martin","Benito Juarez","Francisco de Goya","Diego Rivera","Frida Kahlo","Evita Peron","Joan Miro","Roberto Clemente","Cesar Chavez","Antoni Gaudi","Pablo Picasso","Salvador Dali","Carlos Fuentes","Rigoberta Menchu Tum");
my @factList=("Born in Espana", "Wrote Don Quixote", "Kidnapped by Turkish Pirates","Born in Venezuela","Known as El Libertador","Bolivia named after him","Born in Argentina","Soldier saved his life in his first battle","Helped save Argentina","Born in Mexico","Became President of Mexico","Made the Juarez Laws","Born in Espana","Made the Dark Room Paintings","People question his mental state when he was old","Born in Mexico","Famous Muralist","Married to Frida Kahlo","Born in Mexico","Famous for her Unibrow","Married to Diego Rivera","Born in Argentina","First Argentine to undergo Chemotherapy","First lady to Juan Peron","Born in Spain","Born on April 20th (My Birthday!!!)","Made Bleu II","Born in Puerto Rico","Famous Baseball Player","Roberto Clemente Award named after him","Born in the US","Fought for Farmer's rights","Is now in a large controversy","Born in Spain","Inspired by Nature","Worked on the Sagrada Familia","Born in Spain","Made Guernica","Founded the Cubist movement","Born in Spain","Famous Dali Mustache","Worked with Walt Disney on Destino","Born in Panama","Parents were diplomats","Famous Author","Born in Guatemala","Fought for Indigenous rights","Won a Nobel Peace Prize");
my $freedom=0;
my $previousRand=0;
my $randPerson=0;
until ($freedom){
until ($randPerson !=$previousRand){
$randPerson=int(rand($#hispanoFamosoList));
}
print($hispanoFamosoList[$randPerson],"\n");
my $userInp=;
chomp($userInp);
if ($userInp =~ m\quit\i){
print $userInp;
$freedom=1;
} else{
$previousRand=$randPerson;
my $firstVal=3*$randPerson;
for (0..2){
print($factList[$firstVal+$_],"\n");
}
print("\n"x2);
}
}
!/usr/bin/perl
use warnings;
use strict;
my @codeList = ();
my $codeListStr = "";
my @userGuessArray;
print("Enter desired length of code here: ");
chomp(my $lengthOfCode = int());
my $randNum;
for (0 .. ($lengthOfCode-1)){
$randNum=int(rand(10));
push(@codeList, $randNum);
$codeListStr.=$randNum;
}
my $userGuess;
do{
print qq/Enter a guess here: /;
chomp($userGuess = );
if ($userGuess eq join("",@codeList)){
print "Entry Successful, Entry Given";
} else{
@userGuessArray=split("",$userGuess);
my ($greenCount,$yellowCount,$redCount)=(0,0,0);
for my $countup (0 .. (length($userGuess)-1)){
if ("$userGuessArray[$countup]" eq "$codeList[$countup]"){
$greenCount+=1;
} elsif (index($codeListStr,"$userGuessArray[$countup]") != -1){
$yellowCount +=1;
} else{
$redCount+=1;
}
}
print("Green: $greenCount",", Yellow: $yellowCount",", Red: $redCount \n");
}
} until ($userGuess eq $codeListStr)



