Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. Create a simple web page that includes a short biographical sketch and a photo. It should be structured HTML that passes a validation test.
  2. 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.
  3. 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.
  4. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

When should the last word in a title be capitalized?

Answered: 1 week ago