First page Back Continue Last page Overview Graphics
Simple Input/Output
gets and puts provide line based I/O.
Some general notes about Ruby scripts:
- No semi-colons at the end of statements.
- No auto-conversion of strings to numbers.
- raise generates an exception.
- #{...} syntax provides interpolation.
- Perl: print "Result: \"", chomp($str) x num, "\"\n";