However, the first command my $a ==<stdin>; does not assign to $a the value from stdin, since herecomparison operator "==" is used instead of "=" Moreover, in if/elseif/else statement it is usedNUMERICAL comparison operator "==" is used for comparing strings. In this case boths strings $a and "Pardeep" areconverted to zeros 0, and then these zeros are compared. As they are equal, ($a =="Pardeep") is true, and so the program prints "match"
If we'd use "eq" instead of "==": if($a eq"Pardeep") { print"match"; } elsif($a eq"pardeep") { print"ok" } else { print"not match"; }
then the output will be "not match"Ques 2:The print command print " $b"; will print the value of $b defined at line our $b = 7; since in true subroutine "first" the variable $bwith the same name is defined as "local" So the correct answer is b) 7
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment