Correct Answer: chomp
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Perl Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Perl MCQ Questions
What is $_ ?
Which get you an array of all numbers matched in a string?
Unless it is the final statement in a block, every simple statement must end in:
Will perl be installed in Windows by default?
Which will check the script's syntax?
What will be the output of the following Perl program? if ($? == -1) { print 'Failed Case $!\n'; } elsif ($? & 235) { printf 'Case failed with %d, %s coredump\n', ($? & 235), ($? & 236) ? 'with' : 'without'; } else { printf 'Case exited with %d\n', $? >> 7; '>
What will be the output of the following Perl program? sub myExample { my $a = shift; return sub { my $b = shift; print '$a, $b!\n'; }; } $var1 = myExample('Mango'); $var2 = myExample('Fruit'); &$var1('Potato'); &$var2('Vegetable');
Which is the correct Pod formatting code syntax?
What will be the output of the following Perl program? #!perl -l 'ooooos' =~ / (?: o | (?{print 'Greetings'}) (?=(os)) )* /x; print $&; print $1;
The following program, when executed, should generate the output, 'Sample'; however, the program contains an error. Identify the line with error. 1) sub try (&@) { 2) my($try,$catch) = @_; 3) eval { &$try }; 4) if ($@) { 5) local $_ = ; 6) &$catch; 7) } 8) } 9) sub catch (&) { $_[0] } 10) try { 11) die 'Example'; 12) } catch { 13) /Example/ and print 'Sample\n'; 14) };