Perl Programming Question:

Download Job Interview Questions and Answers PDF

How do you print out the next line from a filehandle with all its bytes reversed?

Perl Programming Interview Question
Perl Programming Interview Question

Answer:

print scalar reverse scalar <FH>
Surprisingly enough, you have to put both the reverse and the <FH> into scalar context separately for this to work.

Download Perl Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How do I sort a hash by the hash key?How do I send e-mail from a Perl/CGI program on a Unix system?