Exercise: Formatting Data
Try to print some information in a specific format.
We'll cover the following
Problem statement
In this challenge, assume that you are given five scalar variables:
$first_name, $middle_name, $last_name, $occupation, $nationality
Your task is to print this information in the format:
Name: last_name
, first_name
middle_name
. Occupation: occupation
. Nationality: nationality
.
Sample input
my $first_name = "Larry";
my $middle_initial = "Arnold";
my $last_name = "Wall";
my $occupation = "Programmer";
my $nationality = "American";
Get hands-on with 1400+ tech skills courses.