Back to labs/answer key page

This is the trickiest part. You might skip it for now and the come back once you've coded up the rest of the while loop.

The basic idea is this: If you're at the beginning of a new NP, then it's time to record what the old NP was. Below, you'll be storing the immediate constituents of each NP in a scalar variable. This step is to print that variable to the output file, so that you can overwrite it with the beginning of this new NP.

To do this, you'll need the print command. The syntax for the print command is this:

print FILEHANDLE string;

where string can, of course, be a variable whose value is a string.

Back to labs/answer key page

-----

Emily M. Bender
Last modified: Fri Dec 8 11:58:21 2000