CS 29
Feb. 11, 1997
^u
(hold down the ``ctrl'' key and press the ``u''
key) and start over.
TERM = (hp)Type vt100 and press enter. You should now see the shell prompt:
[1] %This prompt is how the system tells you it's waiting for a command from you. How nice to be waited upon like this.
^
means press and
hold the ``ctrl'' key.) Answer the following questions:
#!/usr/contrib/bin/perl print "Please enter the first number: "; $first = <STDIN>; print "Please enter the second number: "; $second = <STDIN>; $sum = $first + $second; print "The sum is $sum.\n"; exit 0;
chmod u+x
followed by your file name. Now run the command
ls -l
. (The
period is a part of the sentence, not the command.) The beginning of the
line for your file should start off with -rwx
. If it doesn't, stop
and call me over.
./add.pl
(substitute the file
name you chose). Did your program do what you expected?