Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the output from the following Perl script? You must explain your answer to get any credit. ( 7 points ) $sar = 1

What is the output from the following Perl script? You must explain your answer to get any credit. (7points)
$sar=10
print $var, "
";
&fun1;
print $var, "
";
sub fun1{
local $var =20;
print "\$var inside fun1 before calling fun2 is ", $var, "
";
&fun2;
print "\$var inside fun1 before after fun2 is ", $var, "
";
}
20
sub fun2{
local $var=30
$var++;
print "ISvar inside fun2 before calling fun3 is ", $var, "
"; &fun3;
print "$var inside fun2 after calling fun3 is ", $var, "
";
31
31
}
sub fun3{
my $var =40
$var++;
print "ISvar inside fun3 is ", $var, "n";
41
41
image text in transcribed

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 Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions