What will be the output of the following Perl program?
use strict;
my @x = ("Red", "Blue", "Black");
print `@x = ` . "@x\n";
my ($Mary, $Lisa, $Lara)= @x;
print "$Mary $Lisa $Lara\n";
my ($here, $there)= @x;
print "$here $there\n";
my ($this) = @x;
print "$this\n";
my $this = @x;
print "$this\n";
my ($a, $b, $c, $d, $e)= ("a", "b", "c", "d", "e");
print "[$a] [$b] [$c] [$d] [$e]\n";
($a, $b, $c, $d, $e)= @x;
print "[$a] [$b] [$c] [$d] [$e]\n";
my $var_a = "Monday";
my $var_b = "Friday";
($var_a, $var_b)= ($var_b, $var_a);
print "$var_a $var_b\n";
Correct Answer:
Red Blue Black
Red Blue Black
Red Blue
Red
3
[a] [b] [c] [d] [e]
[Red] [Blue] [Black] [] []
Friday Monday
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Perl MCQ Questions