Question: Need help with Perl, using perl 5 Exercise A3 What is the value of $x and $y after the following statements? $x = 4; $x++;

Need help with Perl, using perl 5

Exercise A3

What is the value of $x and $y after the following statements? $x = 4; $x++; $y += $x + 3;

Exercise A4

Which of the following expressions evaluate to true, and which evaluate to false?

4 < "23A"

-14 < "-13"

"14" != 14

0 >= "AB"

Exercise A5

What is the value of each of the following expressions?

1 <=> 7

2 <=> "H"

4 cmp 7

"4" <=> undef

Exercise A6

Which of the following expressions evaluate to true, and which evaluate to false?

"Hi" && 2

"Hi" || 2

"00" && 4

"00" || "0"

Exercise A7

The following statements set the values:

$x = 3;

$y = 0;

$z = -4;

Then, which of the following expressions evaluate to true, and which evaluate to false?

!( $x < $y ) = True

!( $x >= $y ) False

!( (4 + 5 * $y) >= $z -2 ) && ( $z - 2 )

!($x) && !($y) || !($z)

Exercise A8

Code a single statement, which uses the && operator, and produces the same results as this code:

if ( $x < 10 )

{

$x++;

}

Exercise A9

Code a single statement, which uses the || operator, and produces the same results as this code:

unless ( $x < 10 )

{

$x++;

}

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!