Class 8 Thu, 2017-09-21 Perl continued (HW01)

tutorial, cover loops, if(), sub{}
CPAN wiki , perl CPAN
install modules with CPAN
try 'cpanm Finance::Quote'
perl POD: just google 'perl split' --> split POD , length()

My first program!

FILE:code.precision my first program!
FILE:code.readstuff my second program! , FILE:testfile1 file with some words

Homework 01: due Tuesday, October 2, 2017 (HW01)


1. Write the numbers 10, 533, 238876, and 33984464 in binary, octal, hexadecimal representation.
2. Determine the binary representation of the numbers 5.0, 128, and 22.5 as an IEEE 754 float (32 bit) word. You could do this by hand, but I recommend writing a perl program. You can use all web resources.
3. Grab file 'testfile2' from the web site. Read the file, reformat such that all sizes are given in Mb, and produce nice looking tabular output that all lines up.
homework 01 solution code