in reply to hash with identical keys

This exercise comes from the filehandle reference chapter. You're supposed to open files for each character and write to the correct file when you encounter a line of input. The hint from the end of the exercise is:

Hint: use a hash, keyed by the castaway name, holding IO::File objects for each output file. Create them as necessary.

The hash is for the filehandles, not the data. Give it another go, and if you need more of a hint, peek at the exercise answer. Good luck :)

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review