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


Please Help Members By Posting Answers For Below Questions

What is automatic error handling in perl?

493


Explain which feature of PERL provides code reusability?

720


How do I read command-line arguments with Perl?

599


How can you create anonymous subroutines?

537


“Perl regular expressions match the longest string possible”. What is the name of this match?

522






What is the usage of -i and 0s options?

541


How does polymorphism work in perl?

507


Explain use of ‘my’ keyword in perl?

565


What can be done for efficient parameter passing in perl? Explain.

550


What exactly is grooving and shortening of the array?

588


What is posix in perl?

515


In CPAN module, name an instance you use.

536


Explain the difference between declarations of 'my' and 'local' variable scope in perl?

493


What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?

540


Explain goto expr?

483