Perl Programming quiz, level Intermediate, question 37
| Question: | What would happen if the ran the following Perl statment:
$phone{7187511770} = "New York Office"; |
| Answer 1: | A hash called %phone would be created, and the element called "7187511770" would be set to the text "New York Office" This was the CORRECT answer |
| Answer 2: | The program would fail because the computer's memory got full |
| Answer 3: | A list called @phone would be created, and element 7187511770 would be set to the text "New York Office" |
| Answer 4: | The statement is invalid; a syntax error would be reported |
This was a question from our quiz ... but we have now provided you with
the answer (above) - we prefer to provide you with information rather than to
puzzle you.
|
|