in reply to Re: Perl: Directoriesand files
in thread Perl: Directoriesand files

Since the content of the files doesn't change, why not read the first line of 'message', and if that's numerically 0, (so, it could be "foo", or "0 moon", but not "123 strawberry"), read the first lines of 'message.1', 'message.2', 'message.3', 'message.4', and then print the five lines?

There doesn't seem to be a need for either loop.