Perl Programming Question:
Download Job Interview Questions and Answers PDF
Why is it hard to call this function: sub y { "because" }
Answer:
Because y is a kind of quoting operator.
The y/// operator is the sed-savvy synonym for tr///. That means y(3) would be like tr(), which would be looking for a second string, as in tr/a-z/A-Z/, tr(a-z)(A-Z), or tr[a-z][A-Z].
The y/// operator is the sed-savvy synonym for tr///. That means y(3) would be like tr(), which would be looking for a second string, as in tr/a-z/A-Z/, tr(a-z)(A-Z), or tr[a-z][A-Z].
Download Perl Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
How to read from a pipeline with Perl | What does $result = f() .. g() really return? |