What is the difference between chop & chomp functions in perl?
Answer Posted / nagaraju kancherla
chop() removes the last character from a scalar value.
chomp() checks whether the last characters of a string or
list of strings match the input line separator defined by
the $/ system variable. If they do, chomp removes them.
Is This Answer Correct ? | 25 Yes | 5 No |
Post New Answer View All Answers
Explain the difference between "my" and "local" variable scope declarations. ?
What are the purpose of close(), getc() and read() functions?
what are the steps involved in reading a cgi script on the server?
How do I generate a list of all .html files in a directory?
How do I do fill_in_the_blank for each file in a directory?
How can you create anonymous subroutines?
Explain the internal working of cgi
Give an example of the -i and 0s option usage.
You want to read command-line arguements with perl. How would you do that?
What happens when you return a reference to a private variable?
What is goto statement in perl?
Why do you use Perl?
How many types of variable in perl?
Mention how many ways you can express string in Perl?
What does `new $cur->{LINK}' do? (Assume the current package has no new() function of its own.)