Question
Modify your perl program so that it becomes web based. Specifically, you should: Create a simple web page that includes a short biographical sketch and
Modify your perl program so that it becomes web based. Specifically, you should:
- Create a simple web page that includes a short biographical sketch and a photo. It should be structured HTML that passes a validation test.
- Create a web page with a form that will allow the user to enter the US dollars. Use radio buttons to allow the user to pick the currency to exchange the money to. The web page should be structured using valid html.
- Create a Perl CGI program that processes the web page form data. It should not use the CGI module. It will display the US dollars that were input as well as the converted exchanged currency (both values displayed using 2 decimal places). The generated web page should be structured using valid html.
- Create a CSS style sheet that customizes a few of the HTML tags (body, h1, etc.). Link all three of your web pages in steps #1 through #3 to this style sheet.
Add links so that you can navigate between your index page and your form web page
Program reference:
Code:
use strict;
use warnings;
#money_currency hash to get the exchange rate
my %money_currency = (
P => 0.73,
E => 0.83,
M => 20.14,
C => 1.28,
);
#money_currency_FullName hash to get the full Name
my %money_currency_FullName = (
P => 'British Pounds',
E => 'Euros',
M => 'Mexican Pesos',
C => 'Canadian Dollars',
);
#variable to check for yes/no
my $continueStatus = "";
do{
print "Convert your U.S. Dollars to foreign money_currency ";
print "How many U.S. Dollars do you want to exchange?";
#get money_currency
my $us_money_currency =
chomp $us_money_currency;
print "Enter P (British Pounds), E (Euros), M (Mexican Pesos), or C (Canadian):";
#get money_currency Type
my $money_currencyType =
chomp $money_currencyType;
if (exists($money_currency{$money_currencyType}))
{
#covert to corresponding money_currency
print "Your converted amount is ". $money_currency{$money_currencyType} * $us_money_currency . " " . $money_currency_FullName{$money_currencyType} . " ";
}
else{
#invalid choice
print "You have entered an invalid choice ";
}
print "Do you want to exchange again (yes/no)? " ;
$continueStatus =
chomp $continueStatus;
}while( $continueStatus =~ m/yes/i);
print "Thank you for your business ";
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started