Question: Given the following array: my @students = ( { rst_name => John, last_name => Smith, gpa => 4.0, }, { rst_name => Mary, last_name =>

Given the following array:

my @students = (

{

rst_name => John,

last_name => Smith,

gpa => 4.0,

},

{

rst_name => Mary,

last_name => Doe,

gpa => 1.9,

},

{

rst_name => Aaron,

last_name => Johnson,

gpa => 2.9,

},

{

rst_name => Joe,

last_name => MacDonald,

gpa => 3.8,

},

);

Please write a Perl program which uses map to create a new array that looks like this:

my @names = (

John Smith,

Joe MacDonald,

);

The names are sorted by last name, descending, and exclude students whose gpa is lower than 3.0.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!