What is the difference between chop & chomp functions in perl?
Answer Posted / thangaraju
chop is used remove last character,chomp function removes
only line endings.
Is This Answer Correct ? | 80 Yes | 15 No |
Post New Answer View All Answers
Which of these is a difference between Perl and C++ ?
package MYCALC; use Exporter; our @EXPORT = (); our @ISA = qw(Exporter); our @EXPORT_OK = qw(addition multi); our %EXPORT_TAGS = (DEFAULT => [qw(&addition)],Both => [qw(&addition & +multi)]); sub addition { return $_[0] + $_[1]; } sub multi { return $_[0] * $_[1]; } 1; Program: use strict; use warnings; my @list = qw (2 2); use Module qw(:DEFAULT); print addition(@list),"\n"; Above coding is my module MYCALC and the program which using this module, I have not exported any function using @EXPORT, but I have used the DEFAULT in %EXPORT_TAGS with the function addition, when I call this function from the main it says the error as,
Explain socket programming in perl?
Explain a tell function in perl?
Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.
What $! In perl?
How we can navigate the xml documents?
What does next statement do in perl?
What are different data types that perl supports. Elaborate on them.
What is Perl?
Explain goto name?
What is the use of -w, -t and strict in Perl?
what is perl language?
What is the syntax used in Perl grep function?
What is the purpose of redo statement?