These are the exercises for the first lab session of the course Dokumenthantering VT98. There are 3 exercises this week and 1 of them is obligatory. The obligatory exercises has been marked with a *.
Write a report about the obligatory exercise. The report should contain at least:
The deadline for handing in the report for this week's exercises is Wednesday February 4, 1998.
Tip: Try out the examples from the lecture notes before you begin with the exercises. You can find the example code in the file /home/staff/web/priv/dh98/perl/01.all in the programming examples directory.
wc
program
01.wc.
The program only has to be able to process one file and no
wc
options have to be implemented.
Compare the output of your program with the wc
output.
bar
bar
, ber
and
bor
.
You can test your regular expressions with the perl call:
perl -e 'while (<>) { if (/X/) { printf; } }' <
/corpora/Press65/UnixAscii/p65.001
(the commend should be on a single line)
by replacing the X
with the regular expression.
For this input file the command should produce
183,
495,
211 and
449
lines respectively.