CSIS054: Perl ProgrammingQuestions for week 1
|
|
| QUESTION | ANSWER (highlight to read) |
| In what situations does perl shine as a tool? | Working with text. |
| What are the basic blocks that a perl script is and works with? | Text files. |
| How are files arranged on a PC? | In a hierarchy. |
| What's the basic model of how the internet works? | Client-server. |
| What does the print statement do? | Output text to the command line. |
| What character do perl statements end with? | Semicolon. |
| What character does a comment begin with? | A pound sign (#). |
| What is a string? | A sequence of characters. |
| What is it called when you store something in a variable? | Assignment. |
| What character does a variable start with? | Dollar sign. |
| What is the fancy name for it? | A sigil. |
| How does a variable holding a string differ from a variable holding a number? | No difference. |
| How do you print a variable? | Print statement. |
| How do you print a variable as part of a larger string? | Print statement, with variable inside a double-quoted string. |
| How does your script get input from the keyboard? | $var = <stdin>; |
| On what operating system does perl run? | All of 'em. |
| How do you run a perl script? | >perl xxx.pl (at command line) or from a menu in an IDE. |
| In what order are the statements in a perl script executed? | From the top to the bottom, one at a time. |
| What is "\n" and "\t"? | Control characters for newline and tab. |
| What is the value of a variable that exists but hasn't had a value assigned to it? | undefined. (undef) |
Address of this page is http://hhh.gavilan.edu/phowell/csis054/01questions.html
Please contact Peter Howell at phowell@gavilan.edu for questions or comments.
Last updated January 10, 2010.